Yep. Just install Linux, plug it into your router, set a static ip, and install the nas software ya want.
There are plenty of approaches. ChatGPT is great at debugging issues and helping ya through the setup. I did this with a raspberry pi and external usb drive the other week.