If you don't need the portability of a notebook, then the Mac Mini would be a good option - assuming you've got a monitor, mouse and keyboard (many people do). There are a few things to be aware of.
Recent discussions have centered on the 256 gig SD being a lot slower than some larger capacity options. I don't consider that enough storage to begin with, but take a look. Also, while you might get by okay with 8 gig RAM, I wouldn't go that route. Get at least 16 gig RAM; give yourself some headroom against software bloat over the years, things you might want to do someday that are more demanding, etc... Apple seems to price gouge on RAM and SSD upgrades; some people prefer an external SSD, but not the read/write speeds on some larger Apple internal storage are very fast, so factor that in if you go this route.
I'm typing this on a 2017 iMac 27" 5K setup; beautiful monitor, but it's my understanding that for the last several years iMacs have lacked the feature of allowing their monitors to be used by another computer. In other words, if and when I decide to move on to a newer system, I can't use this beautiful monitor going forward.
I don't like the idea of needing to buy a new monitor every time I buy a new desktop computer.
In recent times I've been reading online discussions to the effect that Macs may display best on some resolutions but not all; 4K seems to be recommended. Bottom line, if you're buying a new monitor for it, pay some attention to whether Mac users have a good experience with that.
There are people debating higher end M2 Pro Mac Minis vs. lower end Studio setups; you can read up on that if you wish.
An iMac will spare you some of the decision-making of buying a Mac Mini-based system, but the included monitor won't last beyond the iMac itself. A good display may last you 2+ desktop systems.