First of all you need to make sure it's your RAM.
Download Memtest86 and make the bootable usb.
Turn of XMP or DOCP in BIOS and let your RAM run on default 2133/2400Mhz frequency.
Boot the USB and let the test run. If you see errors at any stage then you need to determine which stick is faulty.
For that you need to run the test with only 1 stick installed, for both sticks one at a time in the same slot (to rule out a faulty slot).
When you find which stick is faulty you know what to do.
In a rare case where both sticks seem to pass the test on default speeds then you need to repeat the test with XMP ON. If those pass again it's probably some faulty device driver causing the issue but I doubt that.