My last two home computers have been 27" iMacs. Each one has lasted me about 8 years and I've been happy with both of them. Nice big display, good specs, not a lot of clutter. Really good bang for the buck.
At home, I use them for making music (Ableton Live), video production (DaVinci Resolve), photo processing (Photoshop and Lightroom), and programming (various IDEs and editors). I much prefer one good display over a pair of them.
Long-term, maybe it would be more cost effective to get a Mac Mini so that I don't end up paying to replace the display when I replace the machine. But display technology seems to advance about as fast as other hardware specs do, so I suspect I'd want a new monitor at about that rate anyway.
Going forward, though, I probably won't buy another iMac. That's largely because now that I make music with Ableton Live, I want a laptop that I can (aspirationally!) take to shows to play live on.
But for well over a decade, I've been a happy iMac user. I don't care about upgradeability. I buy a machine that has the specs I want when I buy it.
An M4 iMac with 10 CPU cores, 10 GPU cores, 16GB RAM and 1TB SSD costs $1700.
A 14" MBP with 8 CPU cores, 10 GPU cores, 16GB RAM and 1TB SSD costs $2000. Before you add a 27" monitor and desktop keyboard/pointing device.
Why pay that premium if you don't actually need to carry your desktop PC around?