it supports both. more importantly is whether or not the motherboard supports those speeds and even more importantly if you can run those speeds when overclocked
But faster RAM will result in better CPU performance regardless of overclock or not. So for example the 2400G running at stock speeds will perform better with 3200Mhz RAM vs running it with 3000Mhz RAM. Just how Ryzen works.