Motherboard: DDR5 up to 8000MHz
CPU: DDR5 up to 5200Mhz/overclocking with AMD-EXPO
sources
https://www.amd.com/en...https://www.gigabyte.com/Motherboar...A RAM kit up to 5000-6000Mhz is probably good, depending on how much you want to spend, but most important is that it is compatible with AMD EXPO.
Here is an article that explains how AMD EXPO works: 
https://windows.atsit.in/de... (here on an asus mainboard, but from my own experience I can say that it looks very similar on gigabyte).