It would be nice to have the model numbers for your RAM, along with anything else you can provide about your system. I'd be interested to know what kind of PSU you are using.
I like using an 80+ Bronze certified PSU at minimum.
I would start with setting your CPU back to stock settings and using a tool to check your memory. Windows has a memory diagnostic tool, or I would recommend MemTest86. Run this to make sure that your memory isn't faulty. If it is, I hope that you can RMA or get a replacement. I don't know how old your current system is, but often your components are under some kind of warranty. Here's the link:
MemTest86 is the original self booting memory testing software for x86 and ARM computers. Supporting both BIOS and UEFI, with options to boot from USB.
www.memtest86.com
You can check the memory compatibility on the MSI website. I don't have this board but I haven't experienced any issues with most main stream RAM. However, others have had issues that can be found on many forums. Here's the link for that:
https://www.msi.com/Motherboard/support/B350-PC-MATE.html#support-mem-12
I know you said you flashed the BIOS, but do you have the most current version available for that board? I think it's version 7A34vAJ. Here's the link for that:
https://www.msi.com/Motherboard/support/B350-PC-MATE#down-bios
Have you tried using the XMP profiles in the BIOS for your RAM? I had good results with those. I would be interested to know if those work for you at all.
RAM can be the most challenging thing to overclock at this point in time. That's just my opinion, but CPU and GPU overclocking has become very easy in most cases. Ryzen benefits from faster RAM, and I have seen great results with overclocking RAM. However, getting timings or voltages just a little bit off can cause boot issues. I know that some of the MSI boards have a memory feature that allows several boot retries with your memory settings and then goes back to a bootable setting. I believe you have to enable the expert OC setting and it's under Memory Try It.
I always test my new components to make sure everything is working correctly. I'm new to this forum(today). I read a lot of stuff here, but I've never joined. I'm giving you a process that I use, and anyone with more info can chime in. Let us know how it goes, and provide any more information that you can.