They do degrade, but a "couple of years" is pessimistic. My earliest CD-Rs are from 1994 and they're still good.
I've had DVD-Rs fail in 2 years.
The type of DVD matters, of course. Here's a handy guide:
https://www.canada.ca/en/conservation-institute/services/con...