I'm not sure what your situation is exactly, but from a pure performance to cost perspective, you pretty much have to upgrade to a Ryzen X3D chip to see a really good performance improvement.
If you look at the 5700X3D, that chip beats the 9700X in some games and matches it in others. I know you don't have the X3D version, just the plain 5700X. But It would be far more economical just to buy a 5700X3D instead.
If your looking to upgrade platforms for other reasons, then great! But just from a pure gaming perspective, its almost better to just sit on what you have and wait until you can afford a X3D chip like the 9800X3D.