Hello, I have the same problem with a very similar pc.
On the motherboard I have seen that when it happens the cpu light turns on.
It has been happening to me for 2 months and it can go days without happening.
Msi B450a pro max
AMD Ryzen 5 2600
Antec HC Gamer Gold Series 650W 80 Plus Gold...