Jeff Geerling did a blog post[0] and video (series) on this very thing a while ago that goes into some of the hardware and costs. Whilst the costs can be negligible, it looks like a hella lot of fun!
[0] https://www.jeffgeerling.com/blog/2020/raspberry-pi-cluster-...