Check the sticker on your memory, for speed, latency timing values, voltage settings, and for ecc or none ecc type memory.
Any memory with the wrong memory timings, set in the bios settings for memory.
Memory that is overclocked.
If the memory Xmp capable it is enabled in your bios also.
Or memory where the voltage setting for the ram stick is not correct in the bios.
Mixed memory,in brand, and speed of each memory stick used.
Depending on the type of memory you have. there are two standard.
And Ecc type memory.
If the memory is standard, and there is an option in your bios for Ecc memory disable the option.
And if Ecc memory is fitted enable the option to avoid errors.
Make sure if the feature exist in your bios that memory hole remapping is enabled.
That if the memory is placed in the memory slots of the motherboard for dual channel operation.
That mode is set in your bios.
It`s rare for both memory sticks to fail giving an error at the same time, so it suggests the cause is a setting, or the setup of the memory in your bios options are wrong in some way.
May I ask what brand of memory you are using ?