You can only use i5 processors that are from the Skylake (6th gen) or Kaby lake (7th gen), and you can only use the 7th gen CPUs IF your motherboard has a new enough BIOS update to support it. If it doesn't, you will need to update the BIOS first). That means you should look for i5-6400, 6400T, 6500, 6500T, 6600, 6600T, 6600k, 7400, 7400T, 7500, 7500T, 7600, 7600T, 7600k or an i7-6700, 6700k, 7700, 7700T or 7700k.
Much may depend on your motherboard model. It may support only a few, or most, or all, of those processors, so you need to find your motherboard model and check the CPU support list for that board to verify which models it supports before spending time or money trying to obtain one.
Also, buying new is probably not going to be worthwhile because all of those processors AND your platform, are about four years old and are no longer manufactured (Except possibly a FEW of the Kaby lake models) so new ones will likely be new old stock that 3rd party sellers have been hoarding in order to gouge needy buyers later on that don't want to spend the full cost of an upgrade, like you.
You can find decent prices on used models if you look only at highly reputable sellers on Ebay or a Craigslist seller willing to show you that the CPU works before you buy it.
For example:
https://www.ebay.com/itm/Intel-Skyl...436111&hash=item1cd8462f01:g:jG4AAOSwmF1dZBTV
Worst case scenario, you have the Ebay guarantee that if they say the product works correctly, it needs to work correctly or they will force them to refund your money. It's an option, not necessarily THAT particular one, but Ebay type sources in general.
Considering the platforms age, it might be worthwhile to simply save a bit and get something newer. You could do much better by spending a bit more.
This would be like 300% better than anything you could do with your system as is, and maybe 40-50% better than anything you could upgrade your current platform TO.
This is the LATEST gen Intel platform.
PCPartPicker Part List
CPU: Intel Core i5-9400F 2.9 GHz 6-Core Processor ($144.10 @ Amazon)
Motherboard: ASRock B365M Pro4 Micro ATX LGA1151 Motherboard ($78.89 @ OutletPC)
Memory: Corsair Vengeance LPX 8 GB (2 x 4 GB) DDR4-3000 Memory ($44.99 @ Amazon)
Total: $267.98
Prices include shipping, taxes, and discounts when available
Generated by PCPartPicker 2019-08-29 01:38 EDT-0400