I had similar issue with my pc too which is Ryzen 2600 with Msi B450 Tomahawk, and only 3 months old.
After testing each components with different Pc, finally it turned out the Motherboard was the issue.
So, I would suggest you to check each component mainly PSU, RAM, GPU on a different PC, if...