Gaming speed, cores and clocks
The Core i5-12500 and the Ryzen 5 8600G are within a few percent of each other for gaming. In a game, you will not see the difference.
The Core i5-12500 has 6 cores and 12 threads, and the Ryzen 5 8600G has 6 cores and 12 threads. Core counts are the same, so cache size and clock speed decide the difference. Boost clocks are 4.6 GHz and 5 GHz.