I had a similar issue before on a Redmi device where YouTube videos and even local audio files would not play, and sometimes the ringtone menu also showed errors. In my case it was related to a software bug or corrupted audio settings. You can try basic steps like checking sound settings, testing with headphones, clearing cache, or reflashing the firmware if it is a board software issue. Problems like this are often either codec related or audio IC related if it is hardware.
Also if the ringtone section is not opening, sometimes using a new compatible audio file format can help test whether the problem is software related. I found some electronic test tones and sample sounds here that can be useful just to check if the ringtone function works correctly:
Lưu trữ Elektronische
Maybe try with a few different tones and see if any of them play. If none work, then it is probably hardware or firmware related.
Hope you find the solution soon.