There exists only two groups of order $p^2$ up to isomorphism.
Solution 1:
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}$.
Solution 2:
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$.
Solution 3:
The general fact that is useful here is the following:
Let $G$ be a group and $H,K$ subgroups of $G$ such that
- $H\cap K=\{1\}$
- $HK=G$
- $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$.
Solution 4:
A proof of that could be:
The center of a group is a subgroup, so it's order must divide $p^2$, but it's a known fact that if a group has order $p^m$, with $p$ prime, then the center of the group is different from $p^{m-1}$ and different from $1$, so in our case, the center has order $p^2$, so it's abelian.
That's what you already have, know, by the theorem of structure of finite abelian groups, the group can be either $\mathbb{Z}_p\times\mathbb{Z}_p$ or $\mathbb{Z}_{p^2}$. But from that same theorem, one can deduce that a group $\mathbb{Z}_m\times\mathbb{Z}_n$ is isomorphic to a group $\mathbb{Z}_{nm}$ iff $\gcd(m,n)=1$, so in our case, those two groups are not isomorphic, and there are only two groups of order $p^2$.