hard drive – Build a server, with spare RAM modules, SSD and HDD

I have some spare material from two old PCs, for which I can see no immediate use (I currently have a functional laptop in which all of these parts don’t fit).

  • two 8GB RAM modules (DDR4)
  • a 256GB SSD drive (M.2)
  • a 1TB HDD
  • a 512MB HDD

Ideally, I would like to have a kind of server (or a computer dedicated to distant use) at home, connected to my Internet box, at least to share files, and potentially to work from other devices (laptop, phone, etc.).

For a moment, I hesitated to buy a NAS but I find it expensive. I also thought about finding an old computer that I could upgrade and use as a server. Do you have ideas? How could I build something close to a server with my old RAM modules, SSD and HDDs?

Thanks