Proof (group of size prime squared is abelian)
Let $G$ be a group with order $p^2$. $Z(G)$ is non-trivial, so by Lagrange, $|Z(G)| = p$ or $p^2$.
If $|Z(G)| = p$, then $G/Z(G) \isom C_p$ is cyclic, so $G$ is abelian, so in fact $Z(G) = G$.
Let $G$ be a group with order $p^2$. $Z(G)$ is non-trivial, so by Lagrange, $|Z(G)| = p$ or $p^2$.
If $|Z(G)| = p$, then $G/Z(G) \isom C_p$ is cyclic, so $G$ is abelian, so in fact $Z(G) = G$.