CDs specifically are obsolete, but games on optical media are still a thing. Unlike ROM cartridges, which AFAICT died with the GBA in 2008.
Look up the Gameboy 3DS :).
https://www.nintendolife.com/news/2021/05/psa_yes_your_ds_an...
TIL. Thank you :).