To choose a good processor we must know how to identify them, for example in the latest Ryzen 50 processors the first number indicates the generation, and the second number indicates where the processor is in that generation. So even though the 5600X and 5800X are from the same generation, the 5800X offers higher performance.
As for the cores, we must remember that more of these translates into higher quality, for example a dual core will be perfect for basic tasks, and four cores for more complex ones. About the MHz and GHz that are the clock speed, the higher, the faster your processor will work.
Knowing this, it will be much easier to choose and make a good decision.