So there's things like this, where it's a portable cd player (so it outputs line audio) https://a.co/d/j5AmTd0
And then there's also a bunch of external usb-c cd drives that plug into your computer. And those range in functionality/price all the way from basic cd drives to Blu-ray readers/writers.