Welcome!
I still have the same model bought ten years ago in service. Great little computers.
I tried to play a DVD this morning. It accepts it and spins it up, then ejects it.
That can indicate a dirty drive, not a failed drive. Even with careful storage and transport, slot-load drives get filthy. You can get a drive cleaning disk for US$5-15. I've used my $15 cleaning disk to restore full function to three older Macbook Pros whose Superdrives had been pronounced dead and needing replacement by an Apple tech—at a cost fo US$150 parts + labor! 😱
Does a music CD mount and play? That can give clues.
I looked in System Preferences and do not find CD/DVDs listed.
Under Aple, System Report, Disc Burning, it says no disk burning devices present.
That could be a problem. On my 2012 MBP13, the optical drive is functional and shows under "Disk Burning":

It does NOT show under USB.
Also, don't know if this is related but my USB-A slots on the left side of the machine aren't working properly. They seem to pass power but don't allow devices connected to be recognized by the OS. I discovered this when an external mouse wasn't recognized.
I'd try reseting the system management controller (SMC). That might help the drive issue as well. See:
Reset the SMC of your Mac - Apple Support
Please post back with what you find.
Allan