Cool. Is there anything beside clock speed that can affect performance?
A lot of stuff can affect performance, not only speed (well working frecuency), as j121 wrote, the amount of cache, the supported RAM speed and configuration (dual channel can provide a lot of performance in FPS compared to single channel), special instructions, internal cpu design (small changes in the internal layout of cpu can affect its performance by a lot), heat and temperature (in the case of 3rd gen AMD Ryzen for example, the cooler the CPU runs the more chances you have it will boost higher and thus perform better), the GPU (if you have a weak GPU, you can have the best CPU in the world for gaming - right now the Core i9 9900K - and it wont matter much).
So yeah building a PC is all about balancing the important parts for the "task" you want to master. In the case of gaming, GPU, CPU and RAM configuration are the 3 key parts that matter. On a second place it will be the motherboard and the power supply (PSU), you want a decent motherboard with a decent VRM, and a decent PSU to give the right-stable power to all those 3 main components. Finally a clean Windows installation (not clean in the way of instaling Windows every time but on the way of keeping it clean from useless software) and updated drivers.
Cheers