An M6a on AWS has 128 GB of RAM and 32 cores and goes for around $0.60 on the spot market. If you need local SSD and you’re willing to go ARM, an m6gd has a similar spot price and nearly 2 TB of NVME local storage. I’m sure other cloud providers have similar offerings.
I agree with the root comment though that you may want to look at building in a cloud provider using spot instances. You’d have to invest in automation to spin up and tear down machines and manage build artifacts, but it might be more cost effective and operationally simpler than investing in your own hardware.