The strategy is to use the conjugacy action of $G$ on itself. The class equation decomposes $|G|$ into the size of the centre plus the sizes of the non-trivial conjugacy classes. Since $p$ divides everything else, it must divide $|Z(G)|$.
**Step 1: The class equation.**
Let $G$ act on itself by conjugation. The orbits are the conjugacy classes. By the partition property, the distinct conjugacy classes cover $G$:
\begin{align*}
|G| = \sum_{\text{distinct } \operatorname{ccl}_G(x)} |\operatorname{ccl}_G(x)|.
\end{align*}
An element $z$ has $|\operatorname{ccl}_G(z)| = 1$ if and only if $gzg^{-1} = z$ for all $g \in G$, i.e., $z \in Z(G)$. So:
\begin{align*}
|G| = |Z(G)| + \sum_{\substack{\text{distinct } \operatorname{ccl}_G(x) \\ |\operatorname{ccl}_G(x)| > 1}} |\operatorname{ccl}_G(x)|.
\end{align*}
**Step 2: Divisibility analysis.**
By the [Orbit-Stabiliser Theorem](/theorems/796), $|\operatorname{ccl}_G(x)| = |G|/|C_G(x)|$, which divides $|G| = p^n$. For a non-central conjugacy class, $|\operatorname{ccl}_G(x)| > 1$, so $p \mid |\operatorname{ccl}_G(x)|$. Therefore $p$ divides the second sum.
Since $p$ divides $|G| = p^n$ and $p$ divides the second sum, $p$ must divide $|Z(G)|$.
**Step 3: Conclude.**
Since $p \mid |Z(G)|$ and $|Z(G)| \geq 1$ (as $e \in Z(G)$), we have $|Z(G)| \geq p > 1$. So $Z(G) \supsetneq \{e\}$.