If $G/Z(G)$ is nilpotent, then $G$ is nilpotent
Theorem 8 (Dummit, Foote) A group $G$ is nilpotent if and only if $G^n = \{1\}$ for some $n \geq 0$.
There is Quizlet solution to this problem which I wanted to ask a question about. The solution goes as follows:
As the proof demonstrates, $(G/Z(G))^n =1$ by hypothesis. But my question in particular is: how does it follow that $G^n \subset Z(G)$. The connection between $(G/Z(G))^n$ and $G^n$ seems completely foreign to me. Any suggestions on how this conclusion is derived?

The key observation is that $G^n$ is verbal, hence functorial: for any groups $G$ and $K$ and every $n\geq 1$, if $f\colon G\to K$ is a group homomorphism, then $f(G^n)\subseteq K^n$.
In particular, if $K^n=\{e\}$, then $G^n\subseteq \ker(f)$. Apply the result to the canonical projection $\pi\colon G\to G/Z(G)$ to conclude $G^n\subseteq \ker(\pi)=Z(G)$.
This is the exact analogue to the fact that any homomorphism from a group $G$ to an abelian group will have a kernel that contains the commutator subgroup. In fact, it's the same result from the point of view of varieties of groups, as the commutator subgroup is the verbal subgroup associated to the variety of abelian groups, and the $(n+1)$th term of the lower central series is the verbal subgroup associated to the variety of nilpotent groups of class at most $n$.