This has been my experience recently as well. For laptops at least, as long as you buy a system with known good Linux support, the vast majority of the common complaints I see are not really valid.
If you need macOS or Windows to run a specific application exclusive to that platform, great. If your software all runs on Linux, you can gain a lot of freedom and privacy for little effort these days.
And that is where the problem lies. With Windows I can buy pretty much any laptop and expect it to work with. With Linux I have a limited selection of laptops, if I want it to work fully. I'm a developer and I know my way around Linux pretty well, still I usually run into "missing drivers", "package management is broken", "hardware working mostly but not fully" when I try Ubuntu or Debian.
Your options are pretty much just the Dell XPS/Precision line and the Lenovo X1 Extreme series? Anything else?
Disclaimer: Content customer
However with Dell XPS Linux version, Lenovo has a couple, and also System76 and things you have now hundreds of laptops guaranteed to work and many more that actually still will. Just research them first if you're not sure. These days there is so much info on laptops that work well.
The first class supported ones like XPS (which I'm on my second) get firmware updates etc. it gets easier and easier every year.
All I'm doing to have perfect Linux support in all my laptops is to go for the boring models. No RGB keyboard, no bleeding-edge dGPU's, and no dual, or foldable screens.
The reason I don't live in that world is because laptop manufacturers, in the general course of things, don't ship their laptops with Linux; they ship them with Windows.
The obvious answer is to buy from manufacturers who ship their laptops with Linux. You could try Dell or System76.
Incidentally, it would be nice to live in a world where I didn't have to check for MacOS compatibility; I could just buy MacOS from Apple and run it on whatever. The answer is very similar: if you want that experience, buy it from the laptop manufacturer that ships their machines with MacOS.
My go-to is Lenovo, and sticking to the Thinkpad line. Occasionally I've had some growing pains, but I've found using a model that's at least 12-18 months old is more than sufficient for patches to have made it upstream.
Obviously if you have some specific need for a rather new model, then going for something like the Dell XPS line or some other "Linux Certified" line is a better plan. But for my needs, anything within the last 6 years will likely be good enough in my book. I tend to kick intensive jobs off to my local server or set up a one-off in the cloud.