The sound quality you get from a CD, ripped CD files, purchased file, file on USB drive, NAS, or streaming entirely depends on your equipment.
Assuming the same file, it makes sense to get it through streaming as it will cost an order of magnitude less than other sources. Also, streaming is now offering the most high resolution copies of music. Qobuz has over 1/2 million albums in high resolution… for $14.99/ month. So, a screaming deal.
My streaming typically sounds better than a physically played CD even though I have an incredibly good sounding CD player ($17K)… because higher resolution files are available. My streaming often sounds better than my great vinyl rig… so, streaming is the way to go. I gave away all my CDs (2,000)… as streaming usually bested them.
Streaming will only get better… put your intellect and money into streaming.
You can see my systems by clicking on my UserID. I have been working on them for fifty years.