If you are buying new, buy the latest generation product.
New products are not introduced if they do not perform better than what they replace.
9600K is a good gamer, particularly because of the good single thread performance.
Few games can make effective use of more than the 6 threads it has.
To get full performance out of a 9600K, you will need a Z490 based motherboard so you can overclock as the K was intended to do. They are about $150.
You will also need to budget for a decent air cooler. Plan on $50-$80 for that.
The 9600K has 6 threads and a passmark rating of 10899. That is when all 6 threads are fully utilized.
The single thread rating is 2790 which is most important for games.
A 9600K is about $200 and does not come with a cpu cooler.
The alternative i5-10400 has 12 threads and a passmark rating of 12702 with a single thread rating of 1609.
It costs about $180. It includes a perfectly good cpu cooler.
A B460 based motherboard will be about $75
Intel does not depend much on fast ram for performance.
The difference between 3600 and 2666 speed is in the low single digit percentage.
If you found a 3600 speed kit that you like at a good price, you can use it with either processor.
It will run at 3600 speed on a X490 motherboard.
On the B460 motherboard it will default to 2666 speed. No problem there.
Here is a review of the i5-10400:
Intel's new Core i5-10400F offers a large performance jump over the previous generation Core i5-9400F because of its six-core/twelve-thread design. In this Core i5-10400F review we also test the feasibility of overclocking through BCLK, or by relaxing the PL1 and PL2 Turbo Limits.
www.techpowerup.com
Of note, they compared using 3200 speed ram using a Z490 motherboard with 2666 speed.
About a 4% difference.
The processor was a i5-10400F. The f suffix denotes no integrated graphics, it is otherwise identical to the i5-10400. For whatever reason, the i5-10400F versions are more expensive which does not make any sense.