Question PC turns screen off and not working after that ?

Aug 27, 2021
1
0
10
0
My pc randomly shuts the screen off, if there is some sound this sound keeps running but I cant make the screen come on again, and if i try to restart using the restart button the motherboard gives 5 fast beeps and keeps all lights and coolers on. The worst thing is that if i just force it off and on it works again for some time untill it shuts itself off again, can anyone help me?

Specs;
gigabyte H510m-h
i5 10600kf,
GPU: rx580
PSU: corsair cx650

I was using all the above components on other pc but i had to change motherboard and processor because ryzen doesnt like to work for more than 2 years on tropical humid places. please help
 

ASK THE COMMUNITY