Best bang for buck 8 core would be the 5700x, the 5700g isn't bad either but it has intergraded graphics. I personally wouldn't go lower than the 8 cores with a 7900xtx. The 5600x would do good, but with some modern games hammering CPU's and the amount of power that 7900xtx packs, you may run into more situations where you are going to be limited by the CPU if you get the 6 core variant. Though a 5600x is not a bad CPU by any means, but with such a video card, I feel you should have something a little more.
I would avoid the 5800x, not worth it over the 5700x, the 5800x3d is good and worth it if you can find one at a reasonable price, some etailers still have these things marked up a little higher than they should be. The 5900x is a good CPU, but it can be slightly slower than the 5800x3d in some games, but you do get 24 threads to play with which can come in handy if you do a lot of different stuff that can benefit, but not really worth it for just gaming.
Thats my opinion on it, but either 6 core 12 thread or 8 core 16 thread will be a noticeable upgrade over your 3700x in more ways than one.
Good Luck!