Could be something as simple as a dusty laser/sensor, but could also be something terminal.
I’d give it a blast of compressed air, make sure that the laser carriage can move freely on its rails (re-grease if necessary) and then try reading a proper pressed CD (not a CD-R or CD-RW). If it can’t read a proper CD at that point then it’s likely going to need electronic work/replacement parts.