AMD Ryzen5 3600 or i5-9400f
Google says that AMD Ryzen5 3600 is better but i watched gaming tests of AMD Ryzen5 3600 vs intel i5-9400f and intel i5-9400f had more fps.
The R5 3600 is typically faster than a 9400f - it does depend on what game specifically though. Some older titles (e.g. Starcraft 2) just aren't optimised for Ryzen and will run better on the i5.
The R5 3600 is a better investment overall though for a few reasons -
1: it has twice the number of threads (6 cores, 12 threads on the 3600, vs 6 cores 6 threads on the i5).
2: The AM4 platform has far more upgrade options, if you get a current 500 series chipset board (B550 or X570) those motherboards should be getting upgraded to support the next generation of Ryzen cpu, and you already have options all the way up to a 16 core 32 thread cpu in the existing 3000 series. On the Intel side the 9000 series is the last gen supported on that motherboard socket so you only upgrade would be to a higher model 9000 series cpu (the 8 core 9900K being the best option).
3: The AM4 Platform is more modern, it includes support for PCIe gen 4 (useful for next gen graphics cards and faster storage drives) - note you have to get a 500 series chipset motherboard for that.
Edit: If you would prefer an Intel cpu, you would be much better looking at the newer 10th gen - the 10th gen i5 has 6 cores, 12 threads like Ryzen and the motherboard socket will get at least 1 more cpu generation before support is ended.