If you plan on using the Wraith cooler get the 5700X as it is a 65W TDP chip and stock PBO limits are reduced preventing the chip from running as hot. (76W PPT vs the 5800XT 142W) If you later get a better cooler you can always increase those limits to allow the chip to boost higher.
In gaming these 2 chips are very close. If you do things other than gaming that require all-core workloads, the 5800XT would be better as it has higher boost clock and PBO limits, although it's going to be hamstrung by that Wraith cooler so better cooling is a must.
Ryzen R7 5700X | B550 Gaming X | 2x16GB G.Skill 3600 | Radeon RX 7900XT
Ryzen R7 5700G | B550 Gaming X | 2x8GB G.Skill 4000 | Radeon Vega 8 IGP
Ryzen R5 5600 | B550 Gaming Edge | 4x8GB G.Skill 3600 | Radeon RX 6800XT