Well, sorry for the month late response. I'm guessing you've already figured out your issue at this point, but in the slim but possible case you're still waiting on an answer it simply means your GPU can't output this many frames. You can try overclocking it to try and squeeze a few more frames out of it, or upgrade if you have the money for it.
In the case of overclocking, I doubt you will be able to reach a constant 240FPS, but it might help slightly. Here's a really easy to follow guide on how to quickly OC your GPU from Userbenchmark:
View: https://www.youtube.com/watch?v=Rbq-XpeNckY
It's very easy and straightforward, just make sure you don't mess up the numbers before pressing apply.
As for buying a new card, here are a few to consider sitting on a good value for performance.
As for Nvidia cards, I would recommend either the 1660S or the 1660Ti, depending on budget. The Ti is slightly better, but comes at a slight premium.
For AMD, I'd recommend the 5600-XT, being close to the 1660Ti in price and offering comparable performance.
All of those are recent cards and will give you the most features and FPS/$ while still being a considerable upgrade to your RX 580.
There is also the used market, if your area has a good supply of second hand cards. Those can come cheap and give you better value, but they all come with second hand hardware risks. Also make sure it's a substancial upgrade, since a 980-Ti is basically the equivalent of a 1660Ti, generations matter a lot! A 1070/1070Ti/1080 is a good second hand bet if you want an equivalent upgrade and can find them at an advantageous price.
If you do upgrade GPU I recommend downloading DDU and reinstalling fresh drivers, especially if you switch from AMD to Nvidia.
Again, sorry for the delay, I simply stopped going on the forum, as I tend to walk away when my own issues are fixed.
(I'm back, I've got more)
Have a good one and hope this helped!