Gaming speed, cores and clocks
The Ryzen 9 3900X and the Core i5-12400F are within a few percent of each other for gaming. In a game, you will not see the difference.
The Ryzen 9 3900X has 12 cores and 24 threads, and the Core i5-12400F has 6 cores and 12 threads. The extra cores of the Ryzen 9 3900X help with video editing, streaming while you play and heavy multitasking more than with the game itself. Boost clocks are 4.6 GHz and 4.4 GHz.