Hi there brooklyn_dodger_fan42,
Please check out the compatibility below of which Mac devices the Apple USB SuperDrive works with:
Mac Models
* MacBook Air (13-inch, Early 2015 - 2017)
* MacBook Air (11-inch, Early 2015)
* MacBook Pro (Retina, 13-inch, Late 2012 - 2015)
* MacBook Pro (Retina, 15-inch, Mid 2012 - 2015)
* MacBook (Retina, 12-inch, Early 2015 – 2017)
* iMac (Retina 4K, 21.5‑inch, 2019)
* iMac (Retina 4K, 21.5-inch, 2017)
* iMac (Retina 4K, 21.5-inch, Late 2015)
* iMac (Retina 5K, 27-inch, 2019–2020)
* iMac (Retina 5K, 27-inch, 2017)
* iMac (Retina 5K, 27-inch, Late 2014 - 2015)
* iMac Pro (2017)
* Mac Studio (2022)
* Mac mini (M1, 2020)
* Mac mini (2018)
* Mac mini (Late 2014)
* Mac Pro (2019)
* Mac Pro (Late 2013)
That information, and more, can be found here: Apple USB SuperDrive - Apple iMac devices from 2021 do not appear on the list for compatibility, which is most likely why you are unable to play CD discs successfully with the Apple USB SuperDrive.
Take care.