Relationship between CPU and Memory Clock Speeds
Solution 1:
TL;DR: First rule out modules that have clocks faster than what your chipset can support. Then pick modules with highest clock rate to CAS latency (CL) ratio. Don't mix modules with different clock rates and CLs. Don't buy more RAM than your motherboard supports.
Make sure it's supported
Lower-end chipsets have limitations to the highest clock rate (the thing measured in MHz) that they can support. Memory modules faster than that will be underclocked and will work exactly like their slower counterparts. Therefore it's pointless to spend extra money for a faster clock if your chipset can't make use of it. However if you can get the higher frequency module cheaper (wonders of supply and demand!) consider getting it.
Motherboards also have RAM capacity limits. Installing more memory than a motherboard supports will either prevent it from booting or will make some capacity disappear. Similarly, motherboards have a single module capacity limit. Sometimes actual limits are higher than what manufacturer officially supports. Google is your friend here.
It's not just the clock
I'll just quote a fragment from my answer to Are computers still being limited by the RAM frequency?.
You also seem to be assuming that RAM will deliver data every clock cycle. That's not the case. RAM modules have a number of latency parameters known as timings, with CL (CAS latency) timing combined with module's clock frequency being the most important ones. Clock/CL can be used as a rough performance indicator useful for comparison of modules of the same type (eg. DDR4 vs DDR4), with higher values being better. For example a 2400 MHz CL15 module is better than 2666 MHz CL18 module despite having lower clock frequency, because 2400M÷15=160 M operations/second and 2666M÷18≈148 M operations/second.
Compatibility and mixing modules
RAM compatibility can be finicky at times. Some modules may not work properly in some motherboards or on some BIOS versions. Updating the BIOS to the latest version before RAM upgrade wouldn't be a bad idea. Some modules can refuse to work with different module models too, so it's preferable to buy all your RAM in a single batch if possible or try to match what you currently have installed. That being said, most of the time a module will work as long as it's the correct type and doesn't exceed motherboard's single-module capacity limit.
Mixing modules with different clock rates and CL timings is not recommended because you'll be getting the worst of both worlds. All modules have to work at the same clock rate, so faster ones will be underclocked to match the slowest one. Then all modules will be adjusted to run at the lowest CL supported by all of them, ie. again the slowest module will be matched. It will work, but you're leaving some performance on the table.
Caveats
Counter-intuitively, sometimes using higher clock rates can be beneficial despite a worse clock/CL number. For example AMD CPUs use an interconnect called Infinity Fabric which runs in sync with the RAM clock. Therefore the higher RAM clock you're using, the faster the CPU interconnect runs. As a result even though a lower-clocked RAM has a better clock rate to CAS latency ratio, it will force Infinity Fabric to run slower and negatively affect overall performance of the computer.
At the end of the day, actual performance in actual workloads is all that matters.