Dell XPS is good, they even have one which ships with Linux pre-installed. So, no worries about driver compatibility, at least on that version. In fact I believe this is the laptop presently in use by Linus Torvalds, fwiw.
The M2 chip is ARM, it just adds some hurdles. I think there's some work being done for dual-booting Linux on the M2 chip, but as for Windows you have to use Parallels in macOS.
Older Macs with Intel processors will of course run any OS no problem.