They're using the same processor cores, but scaling them up by adding more. They usually add an X or up the number when there's a change to the cores themselves or a major addition in some subcomponent (like the "bionic" stuff, or changing the GPU shader units).
It would've looked really bad if they introduced an M2 half a year after releasing a M1 chip. They would've deprcated the chip that is being used in their existing products.
I expect them to release an M2 chip earliest in the fall of this year or early 2023.