I tried my M1 Mac Mini as a Roon server and it worked poorly. High resolution tracks suffered dropouts because Roon is just emulated on the M1. Maybe you're not interested in Roon, but if so then a Roon ROCK server is by far the best way to go. Roon is built on Linux and emulated on every other platform. Roon ROCK is a stripped down Roon-only version of Linux (no background systems operations interfering with audio). I can play DSD 512 files directly from the Roon ROCK server via USB to my DAC and it sounds glorious.
Removing a general-purpose computer from the playback chain always improves things.
If you are asking about storage media (SSD vs. NAS) then it somewhat depends on your use case. The SSD will wake up instantly vs. the NAS which will often need ten seconds to spin up when you first start to play music. I use a NAS because it is fault tolerant: if a disk fails, I don't lose my whole library. Disks will all fail at some point. Backups are important either way, but the NAS adds a bit of extra security.
I wouldn’t be surprised if someone changed from SSD to NAS or vice versa in their system and found an improvement in the sound. I think it could go either way depending on the system.