When I was using Apple Music I had a smart playlist that would surface music that was no longer available on the service and having to do that sums up one of the many problems with music streaming services. It's not really your collection — you're renting it and your collection only exists on that service. If it disappears, your collection disappears.
I have a similar fear about albums I've purchased on Bandcamp disappearing after the company was sold (yet again). I've developed the habit of downloading my purchases there as 320kbps mp3s and FLAC files for archiving. That archive lives on a hard drive velcroed to the back of my monitor and gets mirrored to a remote backup. I worry about that drive failing, but I'll have the backup.
I still have remnants of my old CD collection, but I did sell quite a few CDs to Amoeba in Hollywood when I needed the money. I regretted it for a time, but I had digital copies and, in hindsight, don't think I'd want to store them all now. The only device I have to play them now is an old Blu-ray player sitting in our entertainment center.
I've streamed my own music and that was mostly fine — you keep your library, upload it and access it. It wasn't quite as reliable as I liked and still leaves you a step removed from your collection (there aren't many viable music lockers either).