Do whatever you need to in order to get to your desktop (Windows or Linux?) and then download the latest BIOS from the MSI website. The next time you turn the PC off should be to flash the BIOS. From personal experience I can tell you that updating my MSI BIOS got my RAM much more stable at higher frequencies. If you're not familiar with the procedure to flash your BIOS, MSI has a short document that explains the procedure well enough.
On another note, which Ryzen 5 CPU do you have?