You can repurpose an old x86 machine. Stay away from HW RAID controllers and Intel NICs are more likely to work without issues. As with anything FreeBSD based, it’s always better to check hardware compatibility before you buy new HW. Or you can eliminate all the questions and just buy a new NAS from the parent company
https://www.ixsystems.com/
Myself, I had two QNAP Intel NAS units that I got fed up with the QNAP QTS vulnerabilities and hard coded credentials, and installed TrueNAS CORE on my 2 QNAP TS-x53A. First on an external SSD, then replaced the OEM built in flash DOM and installed on a larger one. You can run TrueNAS on a USB flash drive for a demo test, but consumer USB flash drives will not hold up long term.
I was so impressed with TrueNAS, I bought a third used QNAP NAS off eBay to work as my TrueNAS SCALE (Debian based) development test NAS.