After 9 years, I said goodbye to my old iMac 21.5 inches after many years of loyal service. It was about time because the old one was having more and more difficulty running the latest software. After hesitating between a new iMac and the Mac Mini, I ultimately opted for the latter. In the long term, it is more beneficial to have a Mac Mini with a separate monitor than an iMac, because when you replace it with an iMac you pay for a screen that does not even need to be replaced. Ultimately, this will save you a lot of money (between 700 and 900 Euro). Apple's screens are of course unparalleled, but I would advise you to get a Mac Mini with an Apple Studio screen. Then you will spend approximately the same amount as for an iMac, but you will not have to buy a new screen next time and you will save money. I personally bought a separate LG screen, which has a quality that approaches the screen of the Studio display...
About the Mini. I really like it, but that's okay because the upgrade from an Intel to an M2 Pro is so big that it makes working a lot more pleasant. So far so great and everything is working like a charm again and with great pleasure.
The only disadvantages in my opinion are the fact that the built-in speakers are very mediocre, as far as I am concerned this is the only point that speaks in favor of an iMac, the sound is much better. But I'm going to solve this with an external speaker.
The other downside is the fact that the USB ports and the like are on the back, which is not always convenient. I personally chose to solve this with a Satechi USB dock. In retrospect, a good idea. The dock not only has a number of ISB ports on the front, but also an audio jack and a memory card reader (which the Mini itself does not have). The Satechi has the important advantage that the disk space for the Mini can easily be expanded because the dock has an enclosure for installing an NVMe M.2 SSD. So the Mini is easily expandable in terms of storage.
The Macs are offered with different sizes of SSD storage, starting from 256 GB, but I would choose at least 512 and honestly I think 1 TB is better. I was able to manage those 9 years with 1 TB just fine. In the future I will put an SSD in the dock so that I can do Time Machine storage and other things there.
Conclusion: a great computer that I can hopefully enjoy for years to come.
My final setup: Mac Mini M2 Pro with 16 GB Ram and 1 TB SSD storage in combination with Satechi Aluminum Hub and an LG 27UP650P-W monitor. In addition, the keyboard needed to be replaced and I added an Apple keyboard (because other keyboards often do not work optimally).