I've been debating between getting the base M4 Mini and assembling a desktop myself with the Ryzen 9600X. Price-wise, both are around the same. Points in favour of the former:
1. Smaller form factor
2. Don't have to bother assembling anything myself
Points in favour of the latter:
1. I can install my favourite flavour of Linux (and Windows too, though I hardly use it any more.)
2. Easy upgradability, especially of memory and storage - I don't foresee upgrading anything else for the next 4-5 years. 16GB/256GB seems to be something I'd quickly outgrow, and the next bump up in configuration is a huge bump up in price.