Comes down to power consumption at the end of the day. I worked out running a homelab was cheaper than cloud (for personal projects).
You're also better off with a newer consumer-level processor, the advancements made is that they use less power for much faster processes with less cores. The 7950x3d for example is great for databases.