The SuperDrive tends to be one of the Mac’s weak links. They are very particular about media, they are very susceptible to dust and smoke, and they tend to be fragile. So here’s my basic diagnostic set:
1) verify that the media is good. Back when I was burning drives frequently I learned to buy cheap media in lots of 25 because I never used a large spindle fast enough.
2) verify that the media brand being used is the same that has been successfully used in the past. There’s some media my SuperDrives refused to burn to even though carrier loading drives had no trouble with it.
3) try using a known good high quality brand - Sony was my go to media.
4) purchase a cleaning kit. It can’t do any harm and sometimes works.
and if all else fails
5) if the computer is no longer under warranty purchase an external burner. The cost of replacing the drive just isn’t worth it.