That's why you buy the last generation of common enterprise components used when industries mass upgrade, which happens every few years.
I built mine in 2018 and I paid $65 each for two E5 2670 v3 ($1600 MSRP, 2014 CPU), and $300 for a dual socket motherboard with 128GB of ram. Yeah it's not the latest and greatest but it's been going strong since then.