I own several Mac Minis spanning examples of each major generation of the design and processor architecture. Some of the later Intel ones (especially the 2012 and 2018, the latter had a minor tweak in 2020) had fairly good high end configurations for CPU cores and memory as long as you weren't worried about GPU performance. I also have an M1 Mac mini for testing (deliberately bought with minimal specs). I haven't bought any of the M2 models yet but am keeping a close eye on the options should the need arise.
The current M2 and M2 Pro models are good candidates for running ARM VMs, and the Apple Silicon GPUs are a lot better than Intel's ones. Basically go for the M2 Pro if you want more CPU, GPU, memory, Thunderbolt ports, displays, or need more than 2 TB internal storage and are willing to pay Apple's excessive storage upgrade prices.
Note that if you are considering a Mac Mini with M2 Pro and intend to upgrade any of the components from base level, you should do a comparison with the Mac Studio with M2 Max: the price is basically identical if you get the Mac Mini with M2 Pro and upgrade CPU/GPU, 32 GB memory and 10 Gbit Ethernet, compared to the base Mac Studio with M2 Max - the latter has yet more GPU cores and supported displays, and adds the front ports, at the cost of a taller body with a bigger cooling system (reports are that the fans in the M2 generation of Mac Studio are usually silent, unlike the previous M1 generation).
The Mac Studio can step up even further to the M2 Ultra, which doubles the starting price for twice as much of everything internal (and the two front USB-C ports become Thunderbolt).