Question CPU fails and PC freezes randomly one in a while

Nov 10, 2019
Hello guys! Your help would be much appreciated
My computer specs:
Ryzen 7 2700
8x1 GB Oloy memory @3000MHz
B450 Tomahawk
RX 570 4GB MSI
120 GB Teamgroup SSD + 2 TB Seagate HDD
500W PSU from BeQuiet! (System Power U9 model)

My computer randomly freezes, my mouse and my keyboard stop receiving any signal whatsoever and finally the monitor too. Case's fans keep running. I would have to reboot the system using the button in the case. After that, computer works normally and only fails like this once in a while. I thought I was having a motherboard issue but after changing from an Asrock B450M HDV R4.0 to an MSI B450 Tomahawk the issue is still there. The good or the bad thing is that now I have EZ Debug LEDs in the board.

The CPU led was solid red which indicates that the CPU is not detected or fail. Does this means that my CPU is faulty? Is there anything else that could be causing the issue?