Collection of links to articles that helped me set up my raspberry pi as a NAS: - https://pimylifeup.com/raspberry-pi-nas/
Update system
sudo apt-get update sudo apt-get upgrade
Set up USB hard drives
Install and configure Samba