I used an inWin Chopin Max case with a Ryzen 5700g and 32gb ram. It does the job well and isnt too noisy even with the stock wraith stealth cooler, though I ended up buying a low profile noctua which was really unnecessary.
If you can still find an AM4 mitx mobo you should be able to pick up the rest quite cheap, though you may want to look at am5.
For near sever grade cpu perf you could go am5 with an x3d and undervolt. The 7800x3d has a 65w tdp mode which is perfect though that’s getting a bit expensive.
Older used 1st/2nd gen Ryzen can be fairly inexpensive as people upgraded to 3rd gen or newer for better gaming performance.
If you happen to go down the used route and buy separate CPU and motherboard just make sure they are compatible. Some early AM4 motherboards (x370/x350) can be a bit limited in what Ryzen CPUs they support because of small BIOS flash chips so ideally get a board with USB flashback.