I see a lot of threads with the same issue, and I am going to post this in a few of them. I have a Sapphire Radeon RX 5700 XT. I also have an X570 motherboard (MSI MPG Gaming Edge Plus WiFi). I have a similar problem where I get random black screens. I hear sound for a few seconds and then the system reboots. It seems to happen when the computer is idle or not under a heavy load. Someone else posted a link to a video they found online with a possible solution and it worked for me. I cannot find the post or the video, though.
The problem was that the video card actually does not work well with PCI-E generation 4. (If you have a motherboard that does not have PCI-E gen 4, then this will not be your solution.)
Many (but from what I understand not all) motherboards have a setting for the PCI-E slots that allow you to select the highest generation of PCI-E that it will accept. The solution for me was to go into the motherboard's advanced BIOS settings and find the settings for the PCI-E slot where the card is plugged in. For almost everyone, it would be in PCI-E slot 1. Change the setting from Gen 4 to Gen 3. (From what I read online, we probably are not getting too much benefit from Gen 4 anyway).
I have not tested this for more than a day, but I left my computer alone for hours. It would have black-screened and rebooted after 10 minutes. So far, no black screens, no crashes, no reboots, so I think it worked.