The Vinyl-vs-CD debate has been raging unabated for over forty years, but the science is pretty straightforward, so let's set the record straight:
Both media are more than adequate to impress our human hearing, but the storage and playback fidelity of audio CDs is objectively superior… for a while.
The data stored on an audio CD is a perfect, lossless representation of its digital master, and remains so from playback to playback thanks to the fortress of plastic surrounding it.
The data etched into a vinyl record, by contrast, is lossy to begin with, and because it sits directly on the surface, erodes (slightly) with each playback.
The adhesive bonds between the thin layers of plastic comprising an optical disc have a significantly shorter shelf life than the plastic itself. As those layers begin to separate — typically within a few decades of manufacture — the data becomes obscured, trapped behind clouds of decay.
Once that happens, a CD's playback fidelity effectively drops to zero.
Of course, so long as you rip your CDs to FLAC while they're still pristine — and back up those files — their superior fidelity can live on indefinitely. (Care needs to be taken to ensure those rips are actually accurate, but that's a whole other story.)
Otherwise if you plan on bequeathing music to the grandkids, vinyl is the way to go.