If your memory passed the Windows memory diagnostic, then it becomes a lot less likely that memory itself is the problem. I would still run Memtest to be sure though. Likely, this is a driver issue. I'd make sure all drivers are up to date including chipset, graphics card, storage controllers, USB and network adapters, as available from your motherboard's product page.
What are your full hardware specifications or if it is a prebuilt system, the model of that?
Testing your memory configuration to verify stability
Before you decide that this section is not worth your time or get lazy thinking you don't need to test because you you're system "seems" fine, with no obvious blue screens, freezing or restarting, let me make one thing VERY, VERY CLEAR.
ANY amount of instability in your memory configuration is enough to cause what are known as micro errors. This is a very miniscule error which, if it only happened one time might not ever be a factor but when it happens cumulatively in small increments over time, can result in complete and total corruption of your operating system, documents, game files, applications, music, movies, everything, to the point of being a complete and total loss with no chance of recovery.
Memory configurations that are not as close to 100% stable as possible are not a joke. They WILL eventually cause widespread corruption of the entire file system. Don't cut corners because it's simply not worth it. If you are unwilling to do the testing necessary to make sure the system is stable you should simply leave the memory at the default configuration and that includes NOT setting the memory to the XMP profile if the profile of the memory is beyond what the system automatically configures the memory speed and timings to by default. Do the testing. One day out of your life is not going to kill you but not doing it might make you wish you had died if you lose a lot of very important information and personal files that can't be replaced.
Go to the Passmark software website and download the USB Memtest86 free version. You can do the optical disk version too if for some reason you cannot use a bootable USB flash drive.
Create bootable media using the downloaded Memtest86 (NOT Memtest86+, that is a different, older version and is outdated). Once you have done that, go into your BIOS and configure the system to boot to the USB drive that contains the Memtest86 USB media or the optical drive if using that option.
2. Right click on the downloaded file and select the "Extract to Here" option. This places the USB image and imaging tool into the current folder.
3. Run the included imageUSB tool, it should already have the image file selected and you just need to choose which connected USB drive to turn into a bootable drive. Note that this will erase all data on the drive.
No memory should ever fail to pass Memtest86 when it is at the default configuration that the system sets it at when you start out or do a clear CMOS by removing the CMOS battery for five minutes.
Best method for testing memory is to first run four passes of Memtest86, all 11 tests, WITH the memory at the default configuration. This should be done BEFORE setting the memory to the XMP profile settings. The paid version has 13 tests but the free version only has tests 1-10 and test 13. So run full passes of all 11 tests. Be sure to download the latest version of Memtest86. Memtest86+ has not been updated in MANY years. It is NO-WISE as good as regular Memtest86 from Passmark software.
If there are ANY errors, at all, then the memory configuration is not stable. Bumping the DRAM voltage up slightly may resolve that OR you may need to make adjustments to the primary timings. There are very few secondary or tertiary timings that should be altered. I can tell you about those if you are trying to tighten your memory timings.
If you cannot pass Memtest86 with the memory at the XMP configuration settings then I would recommend restoring the memory to the default JEDEC SPD of 1333/2133mhz (Depending on your platform and memory type) with everything left on the auto/default configuration and running Memtest86 over again. If it completes the four full passes without error you can try again with the XMP settings but first try bumping the DRAM voltage up once again by whatever small increment the motherboard will allow you to increase it by. If it passes, great, move on to the Prime95 testing.
If it still fails, try once again bumping the voltage if you are still within the maximum allowable voltage for your memory type and test again. If it still fails, you are likely going to need more advanced help with configuring your primary timings and should return the memory to the default configuration until you can sort it out.
If the memory will not pass Memtest86 for four passes when it IS at the stock default non-XMP configuration, even after a minor bump in voltage, then there is likely something physically wrong with one or more of the memory modules and I'd recommend running Memtest on each individual module, separately, to determine which module is causing the issue. If you find a single module that is faulty you should contact the seller or the memory manufacturer and have them replace the memory as a SET. Memory comes matched for a reason as I made clear earlier and if you let them replace only one module rather than the entire set you are back to using unmatched memory which is an open door for problems with incompatible memory.
Be aware that you SHOULD run Memtest86 to test the memory at the default, non-XMP or custom profile settings BEFORE ever making any changes to the memory configuration so that you will know if the problem is a setting or is a physical problem with the memory.