3700x. You're going to want more cores going into the future, considering new consoles will be able to fully utilise their cores better than previous gen ,meaning that future PC games will also benefit from a higher core count. This can already be seen in games like Horizon Zero Dawnwhere it scales all the way up to 12 cores and 24 threads. 3700x is 8cores 16 threads.
If you plan on going to 1440p the newer Zen 3s, 5600, 5800X, 5900X are all going to be pretty much useless for just gaming, as you gain very little frames at 1440p out of a 5800x compared to a 3700x at 1440p.
Even at 1080p I'd still choose the 3700x simply due to it having more cores and threads but a 5600x would give more FPS at 1080p although probably not worth the trade off of using a 6 core 12 thread processor.
However if you plan to upgrade regularly, let's say every 2ish years, then a 5600x is fine, but if you want the PC to last 4/5 years or more, going with more cores will be beneficial.
Unsolicited GPU advice but anything higher than a 3060ti is probably wasted on 1080P
3070/3080 you're probably going to want a 1440p screen to get the most out of your PC and your money. Unless you have a 1080p 240hz/360hz screen then a 3070/3080 would be a waste for that resolution.
1440P 144HZ is the sweet spot anyways.
Hope I was of help