I’ll second what has been said. Depending on what kinds of games you play will guide your CPU purchase. If you play CPU heavy games (simulators, grand strategy, Escape from Tarkov, etc.) the X3D variants would be a good choice. For previous gen that would be the 5800X3D. My brother has this one so I can tell you firsthand that it is a beast of a processor. However, this would lock you into DDR4 ram which means your next upgrade is guaranteed to need a new mobo, processor, and ram. The upside is that it’s fairly inexpensive compared to current products, so it’s good if you’re on a budget. If you don’t play those game the normal 5800X should be good.
If you’re looking for more current DDR5 build that you might be able to reuse parts for on your next upgrade, the 7800 and 7800X3D are what you want to be looking at (the 7800X gives you marginal improvement for way more power usage if I recall correctly, so not worth imo). I upgraded from an i7 7700k to a 7800X3D earlier this year and noticed fairly sizable improvements in performance for the games I play.
Either way, I don’t think you can go wrong with any of these options.