The center of a group $G$ is defined as $Z(G):=\{ z\in G : gz = zg, \; \forall g \in G\}$.
The goal is to show that if $\vert G\vert = pq$, where $p$ and $q$ are not necessarily distinct primes then either $G$ is abelian or $Z(G) = \{ e\}$.
I want to suppose that $Z(G) \neq \{ e\}$ and then use the fact that $G/Z(G)$ is cyclic to imply that $G$ is abelian, which is something I have already proven. But how do I show that $G/Z(G)$ is cyclic when I am not certain what exactly $Z(G)$ looks like. I only know that it has at least one non-identity element in it, which will be of order $p$ WLOG, (the case where it is of order $pq$ is trivial).
Any help is appreciated. Thank you.