AM4 Socket Based MB for AMD CPU

AMD B320 Chipset Motherboard
AMD B450 Chipset Motherboard
AMD X470 Chipset Motherboard
AMD X570 Chipset Motherboard

My DVD Writer is not reading DVD's and CD's. What do it do?

DVD Writers or any Optical Drive like DVD Players, CD Drives should be regularly cleaned using Lens cleaning kit which you may find at this link

If it doesn't help, it is better to replace it with a New One as the Cost of Repair of an Optical Drive could be somewhat near the Cost of New Piece itself.