Let's get the obvious out of the way first: you need a CPU and motherboard that can handle higher memory transfer speeds like DDR4-3600 MT/s for this to matter at all. Intel currently supports up to DDR4-2933, AMD up to DDR4-3200. Higher transfer rates are possible through overclocking, but you need a CPU and motherboard that support memory OC.
Next on the list is memory capacity: it depends on your workload. If your workload requires e.g. 32GB or RAM, you need 32GB of RAM. No amount of memory speed can ever make up for a lack of total memory. My rule of thumb is: when in doubt, get more memory, not faster memory.
On the subject of "32GB is overkill for gaming": we are currently at the tipping point where some games start to benefit from more than 16GB of memory. And memory consumption will continue to grow in the future. So unless you are on a tight budget or want to upgrade in 1-2 years anyway, 32 GB can be justified, even for a PC that is exclusively used for gaming. And as soon as you do other stuff like 4k video editing, I would consider 32GB the minimum when buying a new PC.
Which brings us to memory transfer speeds: you might have guessed it already, it depends.
Workloads commonly encountered in video editing or 3D animation show very little uplift from higher memory frequency. When given the choice between 16GB DDR4-3600 or 32GB DDR4-2666, the latter is almost a no-brainer for this kind of application.
Games are a different story, and the answer is twofold. In GPU-limited scenarios (high resolution, ultra details, weak graphics card...), memory performance does not matter too much. You just need enough of it to avoid stutter.
In scenarios that are not enirely GPU-limited, memory performance can have a huge impact. Especially on frame time performance, often reported as 1% or 0.1% lows in benchmarks that do not only report frame rate averages. The current sweet-spot for price/performance is somewhere around DDR4-3600. Most current higher end consumer CPUs (AMD Ryzen 3000/Zen2, Intel core 9th gen) can handle it on the right motherboards, it is not yet in the realm of diminishing returns, and memory rated for even higher speed gets really expensive.
In conclusion: I would recommend you get 32GB if you can afford it, even if that means lower than DDR4-3600 transfer speed.
As a side-note, memory can be overclocked beyond its rated frequency, and further optimized with tighter timings. Assuming the motherboard supports memory OC. Most lower end DDR4 memory can be bumped up in frequency quite a bit, without applying unhealthy voltage levels. The default DDR4 voltage is 1.2V. Many higher frequency memory modules simply bump the voltage to 1.35V in order to achieve higher frequencies, which is perfectly safe. And something you can easily do yourself, without paying the memory manufacturer for it.