That said, don't buy Intel. AMD are just as fast and use way less power.
This is reasonable advice. Intel are clawing their way back up but I would still go AMD right now if I were getting back in.
And on that note I'll extend
@Second Sun 's direct answer to your question to include AMD numbering which you didn't ask about but probably should have. It's similar to Intel. The first number is the generation. The second number is broadly speaking the power category (not in the watts sense) of the chip. So a Ryzen 5600 is the older version of the Ryzen 7600. And a Ryzen 7700 is more powerful than a Ryzen 7600. Usually by more powerful it means more cores. So there are some scenarios in which a more powerful chip wont actually be more powerful - e.g. very single-threaded tasks that don't benefit from more cores.
Newer isn't always better. They're overlapping things. So a Ryzen 7600 which has six cores is going to be a bit better than a Ryzen 5600 which also has six cores - clocked higher, more power efficient, possibly more IPC (instructions per clock), etc, but it being newer isn't going to be enough to make it better than a 5900X which has twelve cores. But again, there's nuance. The 7600 is actually clocked higher so there are scenarios in which it WILL be better.
There are some sub-categories just to mildly complicate things. Some of the newer Ryzen chips have 3D Cache versions of the procssor. That's the chip with some extra cache bolted on top of the thing which makes it faster for some tasks that benefit from it. Gaming being chief amongst it. And just to add some confusion AMD name their chips "Ryzen 5, Ryzen 7, Ryzen 9" but these are broad categories of how powerful they are for lay people. Really just look at the long number e.g. Ryzen 9
7950X.
You said you were interested in it for gaming. You need to avoid weak points in the build, e.g. you don't want a very old processor or a mechanical hard drive for your system, but allowing for that you don't necessarily get the equal return on your investment by over-spending on everything. A graphics card is more likely to be a bottleneck than a CPU so spending any extra budget on a better graphics card is more likely to get you a benefit in gaming than spending the same money on getting a better CPU. In general, I would say start with looking at mid-range Ryzen and work back from there to get the motherboard, RAM, SSD, etc. If you tell us what sort of gaming expectations you have (type of game, size of monitor, level of quality you insist upon) we can probably guide you to something that can achieve that without overspending.