I have a 3700x CPU with a Asus TUF X570 Gaming Pro motherboard and with G-Skill Neon 32GB RAM running at 3600Mhz without any issues.
In BIOS I set the Mhz to 3600Mhz instead of using Asus DOCP overclocking feature.
You need to go to your Motherboard's QVL List for RAM MEMORY for your processor and see if your RAM is listed. If it is listed see it is compatible for OCing or not.
If not listed go to your RAM's manufacturing website QVL List and see if your motherboard or processor is listed as being compatible.
elstaci