Any improvement?
Yes. Particularly if you need more threads.
But likely, you will not be impressed.
Your i3-8100 has 4 threads and a passmark rating of 6143. That is when all 4 threads are 100% busy.
The single thread rating is 2242. Single thread rating is arguably the more important metric for gaming.
The I5-9400F has 6 threads and a rating of 9542/2482.
A modest improvement.
It sells for about $80 on ebay.
What is the make/model of your motherboard?
Likely, it could support a processor as strong as a I7-9700K with 8 threads and a rating of 14561/2909. It goes for $220 on ebay.