The Intel Core i5-10600K wins in 5 out of 14 comparable specs, with 6 ties. Its biggest advantage is Threads (100% better).
Core i5-9400F wins in 3 specs (Max Turbo Power: 64% better).
Recommendation
Choose Core i5-10600K if you want the best overall performance — especially threads.
Choose Core i5-9400F if max turbo power matters more to you.