What kinds of games do you play?
If you play fast action games, then a good upgrade might be a stronger graphics card.
Try this simple test:
Run YOUR games, but lower your resolution and eye candy.
This makes the graphics card loaf a bit.
If your FPS increases, it indicates that your cpu is strong enough to drive a better graphics configuration.
If your FPS stays the same, you are likely more cpu limited.
If you are cpu limited, a processor upgrade makes sense.
What is the make/model of your motherboard?
If you have a z390/z490 motherboard some 25% added cpu capability is available via overclocking.
If you will also change the motherboard, a 5600X makes sense.
The higher IPC is impressive. The single thread performance is...