Having an idea of what sort of budget you are considering would be useful. If you are coming from a sub-$200 RX570 though, then I imagine you might not be looking at $500+ cards.
Due to a shortage, graphics cards in general are priced quite poorly at the moment though, at least at US online stores, where anything you can find in stock is typically at around double the suggested price. So it's probably a really bad time to be buying a graphics card right now, and that will likely continue for a number of months to come. It might be worth just sticking with your existing card for the time being, unless the pricing and availability situation is significantly better where you are.
As for what is the "best GPU for an i5-10400F", that processor should be able to handle any graphics card on the market fairly well. In terms of gaming performance in today's titles, it's not too far behind the top-end CPUs, which tend to only be around 15-20% faster in CPU-limited gaming scenarios. Though if you are only gaming at a lower resolution like 1080p, the highest-end cards will end up underutilized in almost every current game on the market with even the fastest CPU available today, as those cards tend to be better suited for higher resolutions like 1440p and above where there is more load on the graphics card. Aside from some less-demanding eSports titles, most modern games are not going to manage to hit 240fps even with the fastest CPU and GPU on the market, so you should not expect that.