First of all, passmark does not have a great number of submissions for each. Perhaps 50.
The 11400 is 11th gen so the cpu performance per clock is perhaps 19% better than the 10th gen 10600k
The clocks of each are at stock.
But each processor can go faster if conditions permit.
On a few cores, they each can turbo up higher. 4.8 on the 10600k.
And 4.4 on the 11400. But, when you consider that 11400 is faster per clock, they become similar.
Then, there is overclocking, and you can bet that most passmark 10600k submissions were from overclocked systems.
Overclocking is of advantage in a system where all of the 12 threads can be fully utilized.
Not so much in gaming where allowing the turbo mechanism is likely more productive.
You would do about as well with either. For simplicity, I would favor the newer gen and turbo.
Here is a gaming review of the 11400:
The Core i5-11400F coupled with a B560 motherboard make for an interesting build configuration, as it's significantly cheaper than the Core i5-11600K/Z590 and less than the cost...
They are comparable.
I might clarify ram support.
The supported speed is what will get you into the bios where you can set faster speeds if the motherboard permits.
How fast depends on both the ram, motherboard chipset as well as the cpu.
B560 and Z590 motherboards permit ram overclocking.
Then, also, do not overpay for fast ram in intel. Performance differences are minor if you are using a discrete graphics card. Think <5%.