Ram to operate properly must be all from the same matched kit.
Even the same part numbers may not work together, the internal chips may be entirely different.
Ryzen is particularly sensitive to ram compatibility issues.
Run memtest86+
It boots from a usb stick and does not use windows.
You can download it here:
Memtest86+ is an advanced, free, open-source, stand-alone memory tester for 32- and 64-bit computers (UEFI & BIOS supported)
memtest.org
See if there is a bios update for your motherboard that addresses ram compatibility issues.
If you can run a full pass with NO errors, your ram should be ok.
Running several more passes will sometimes uncover an issue, but it takes more time.
Probably not worth it unless you really suspect a ram issue.
If you run clean, your problem is likely elsewhere.
Sometimes increasing the ram voltage will get things to work.
XMP or the ryzen equivalent is not likely to work.
The specs embedded in the ram may well be different.