I am sure this question was asked here before, maybe even multiple times. But I can't find it right now and it really bugs me:
Let $G$ be a group with $|G|=p^2$. Then $G$ is abelian.
For the proof we have 3 cases: $|Z(G)|\in\{1,p,p^2\}$, two of which I understand. Let $|Z(G)|=p$, then $G/Z(G)\cong\mathbb{Z}_p$, so $G/Z(G)$ is cyclical and therefore $G$ is abelian.
Question: This would mean that $Z(G)=G$, so there it's ultimately a contradiction although it proofs that $G$ is abelian. How do I interpret this proof?