If $Z(G) = {p}^{2}: $ then $|G/Z(G)| = p$, then its only subgroups are {$e$} and $H$ with $|H|=p, \ so \ H = G$. Any non-identity element of $G$ has order $p$, then it generates all $G$, then it's cyclic.
If $G/Z(G)$ cyclic, it means that $ \exists \ x \ \epsilon \ G : \ <xZ(G)>=G/Z(G) $
With this in mind we know that if ${g}_{1} , {g}_{2} \ \epsilon \ G$ then ${g}_{1}Z(G) = {(xZ(G))}^{a} = {x}^{a}Z(G)$. Then there exists ${z}_{1} \epsilon Z(G)$ such that ${g}_{1} = {x}^{a}{z}_{1}$. In the same way we can assume ${g}_{2} = {x}^{b}{z}_{2}$
${g}_{1}{g}_{2}= \ {x}^{a}{z}_{1} {x}^{b}{z}_{2}=... \\$ and since ${z}_{i} \epsilon Z(G)$
$ ...= \ {x}^{a}{x}^{b}{z}_{1}{z}_{2} = {x}^{b}{x}^{a}{z}_{2}{z}_{1}={x}^{b}{z}^{2}{x}^{a}{z}^{1}={g}_{2}{g}_{1}$
this proves that $G$ is abelian.