RAM can bottleneck CPU or vice versa, but it doesn't mean you have to match the frequencies. It just means that if one is too slow, the other one won't be able to run at its full potential.
Am I reading it correctly that you want to keep your current RAM and add more? If that's the case, ideally you'll want to buy identical modules as already installed in the system, or at least to match the frequency and timings (CL etc.). You can read these parameters from your current modules using CPU-Z or other software.
Why match them rather than buy faster? Because all RAM has to work in sync and faster modules will slow down to match the slowest one. Buying faster RAM makes sense if it's cheaper (it happens sometimes). Buying slower isn't a good idea because it will slow down your current (faster) RAM.
Note that frequency isn't the only factor at play. There's also a bunch of timings, with CL being the most important. The lower the timings, the better. Were you replacing your current RAM (rather than keeping it), you'd generally want to look for the highest frequency to CL ratio, but with frequency no lower than 3000 MHz. For example 4000 MHz CL20 is worse than 3600 MHz CL16 (because 4000÷20=200 and 3600÷16=225).
(And there's more timings than just CL, and with AMD CPUs the Infinity Fabric runs at RAM speed so sometimes higher frequency is better even with worse timings… There's a lot of nuances. If you don't want to dive into this rabbit hole, match your current RAM or buy by highest frequency÷CL)
It's worth keeping in mind that you'll be seeing diminishing returns the higher frequency you get. Also better RAM is significantly more important when you're using the integrated GPU, but that mostly matters in low budget systems of course.
On a side note, assuming that CPU runs at 3.4 GHz is incorrect, because it will by default boost its clocks up to 4.9 GHz, even without any OC. That's how modern CPUs work: 3.4 GHz is the "guaranteed" clock that the CPU can maintain indefinitely, 4.9 GHz is what it can run at for limited period of time as long as it doesn't get too hot and the motherboard is able to provide enough power.