CDs are better than vinyl and most people listen to music on systems that sound dreadful
CDs are in every way better than vinyl records. They are smaller, much higher quality audio, lower noise floor and don't wear out by being played. The fact that CD sales are behind vinyl is a sign that the world has gone mad. The fact you can rip and stream your own CD media is fantastic because generally remasters are not good and streaming services typically only have remastered versions, not originals. You have no control on streaming services about what version of an album you're served or whether it'll still be there tomorrow. Not an issue with physical media.
The vast majority of people listen to music using equipment that produces audio of poor quality, especially those that stream using ear buds. It makes me very sad when people don't care that what they're listening to could sound so much better, especially if played through a hifi from a CD player, or using half decent (not beats) headphones.
There's plenty of good sounding and well produced music out there, but it's typically played back through the equivalent of two cans and some string. I'm not sure people remember how good good music can sound when played back through good kit.
My amplifier has all the streaming services available and some of them like Tidal stream at higher bitrates than a CD. CD's are obsolete these days, I don't know anyone who still has a CD player. So obviously sales decline.
Vinyl on the other hand is an (analog) experience by itself. In my experience there is nothing like crate digging for unique samples at the local record shops, sampling them with my AKAI S-1100, the warm dynamic sound of it, the noise floor bringing harmonic distortion, the ticks and cracks that add to the groove.
Yeah, vinyls would die if it was only about sound quality. So as would heating food over campfire when there are perfect convection ovens, effective microwaves, etc