$G/Z(G)$ is cyclic then is abelian? my question is if $G/Z(G)$ is order of p then is commutative then is abelian group but if G is abelian then $G=Z(G)$ therefore $G/Z(G)$ is not order of p?Is it contradiction?

Note that $G/H$ abelian does not always imply $G$ abelian.
Your argument seems to assume that this holds.
It is not even true that $G/H$ cyclic always implies $G$ abelian. (Take $G=S_3$ and $H=A_3$.)
However, it does when $H=Z(G)$. That is the point here.
