Question Pc boot loops then starts after a min

Sep 1, 2019
I am having a problem with my pc where whenever i try to turn it on it goes into a boot loop then after about 1 min it turns on all the LEDs and fans then boot loops with all the LEDs on and the fans slow down and speed up then after about another minute it starts up and runs perfectly but then it keeps on randomly freeze and then my screens go black when I try to close a program, am watching YouTube, or playing a game.
I have bought new ram recently also but I assume it’s not the ram because it tried using my brothers ram and the same thing kept happening. Also not the power supply because I’ve tried 3 different ones and it still happens. Not the gpu because I stress tested it for over 20 min and nothing happened. Also tried resetting CMOS and that didn’t change the outcome. Can some one please help me just trying to play with the boys.
Cpu: Ryzen 5 1600
Gpu: msi rx 580
Mobo: Ab350m pro4
Ram: g skill 16 gb 3600mhz
Psu: thermaltake 500w 80+ bronze