Please allow me to answer your questions in English.
According to western medicine (西醫), masturbation (自瀆) by itself is not harmful to the body. The situation that you described could be due to your general physical condition (身體狀態). Possibilities include mental and physical stress, fatigue, lack of sleep, lack of exercise, and chemicals such as smoking or drinking too much.
I suggest that you try to improve your general physical and mental condition first by examining those possibilities to see whether your sexual function improves. Try not to masturbate too frequently or put too much pressure on yourself.
If the condition continues, you could consider seeing a 西醫 for a medical checkup first, and then see a 中醫 to 調理身體. The most important thing is to take care of your own health first.