There exists only two groups of order $p^2$ up to isomorphism.

Let $G$ be a $p^2$ group. As you said, it is Abelian.

Note that the order of every element divides $p^2$, so is equal to $1$ (for the identity $e$ only), $p$, or $p^2$.

If there is an element $x$ of order $p^2$, then $G=\langle x\rangle$ by cardinality. So $G$ is cyclic, and as you pointed out $$ G\simeq \mathbb{Z}/p^2\mathbb{Z}. $$

Now assume that there is no element of order $p^2$. This means that every element which is not the identity has order $p$. Pick $x$ order $p$. Since $\langle x \rangle\subsetneq G$, you can take another order $p$ element $y$ in the complement of $\langle x \rangle$.

Now $$ \theta:(u,v)\longmapsto uv $$ yields a homomorphism from $\langle x \rangle\times\langle y \rangle$ to $G$. Note that $\langle x\rangle\cap\langle y\rangle=\{e\}$, so the latter is injective. Since both groups have the same cardinality $p^2$, it follows that $\theta$ is an isomorphism.

Finally, since $\langle x\rangle \simeq\langle y\rangle \simeq \mathbb{Z}/p\mathbb{Z}$, we have $$ G\simeq \langle x \rangle\times \langle y \rangle\simeq \mathbb{Z}/p\mathbb{Z}\times \mathbb{Z}/p\mathbb{Z}. $$

So $G$ is either isomorphic to $ \mathbb{Z}/p^2\mathbb{Z}$ or to $\mathbb{Z}/p\mathbb{Z}\times \mathbb{Z}/p\mathbb{Z}$.


If the (already known to be abelian) group $H$ in question is not cyclic, pick any nonzero element $a$. Its order must be $p$, so $\langle a\rangle$ is a subgroup of order $p$. Finally, consider $H/\langle a\rangle$, or, alternatively, pick another arbitrary element $b$ from $H\setminus\langle a\rangle$, and aim to prove that $\langle a\rangle \cap \langle b\rangle=\{ e\}$ and $\langle a,b\rangle=H$.


The general fact that is useful here is the following:

Let $G$ be a group and $H,K$ subgroups of $G$ such that

  1. $H\cap K=\{1\}$
  2. $HK=G$
  3. $H,K\unlhd G$

Then $G\cong H\times K$

Now, if $G$, your group of order $p^2$, is not $\mathbb{Z}_{p^2}$ then there exists $a,b\in G$ such that $\langle a\rangle\cap\langle b\rangle=\{1\}$ and $|a|=|b|=p$. Since

$$\left|\langle a\rangle\langle b\rangle\right|=\frac{|\langle a\rangle||\langle b\rangle|}{|\langle a\rangle\cap\langle b\rangle|}=p^2$$

you know that $\langle a\rangle\langle b\rangle=G$ and so from the above fact $G\cong \langle a\rangle\times\langle b\rangle\cong \mathbb{Z}_p^2$.