The original generation of CDs back in the 80s were often just ripped from whatever source they could find. In many cases, the vinyl did sound better than the CD. This is why there was such a market for remastered CDs. Vinyl has a much wider frequency range and a much warmer tone, but the latter was frequently down to the quality of the systems used, with separate amps and speakers. Many CD players were tiny, tacky, cheap horrible things that couldn't reproduce the limited range that was on the CD.
Old vinyl records were mastered by engineers who knew their stuff. These days anyone can master a CD an their laptop, and the "Loudness War" didn't help. Nowadays vinyl pressings are taken from digital masters, so even that analogue warmth that was the hallmark of vinyl has been lost - frankly, there's no point
A well produced, well mastered CD on a quality hi-fi system sounds better than vinyl any day of the week. But vinyl sounds better than a badly mastered CD on a cheap and nasty CD player.
Cassettes were a horrible medium with no advantages - they used to warp and stretch and wear out and get chewed up in the machine. Thank God they died a death.
And yes, the lack of a CD player in new cars makes me feel old too