The Intel Core i3-12100F wins in 10 out of 14 comparable specs, with 2 ties. Its biggest advantage is L2 Cache (233% better).
Core i5-8600K wins in 2 specs (Total Cores: 50% better).
Recommendation
Choose Core i3-12100F if you want the best overall performance — especially l2 cache.
Choose Core i5-8600K if total cores matters more to you.