Laptop is a compromise (mostly because of mobility), desktop is always better for gaming starting with it's thermal design advantages.
For both types minimum specs are 16 GB RAM, a dedicated GPU with dedicated VRAM (usually standard for desktops, quite important for laptops) and an Intel i5 or Ryzen 7 CPU. Also important is a NVMe "disk" instead of a SSD or - by no means - an ancient HDD with real rotating disks.
Finally you should look for good cooling abilities because esp. laptops tend to overheat with temparature sensor triggered shutdowns, also because of dust and dirt accumulating over time in the fans and cooling pipes. At worst they can be damaged due to overheating.
It's a tricky question. Usually you get as much different opinions as people are answering 😊