I want to understand the proof that $g^x = g^{x\bmod m}$ for $g\in G$ for $G$ such that $\vert G\vert = m$
The proof goes as follows
say that $x = qm+r$
then $$g^x = g^{qm+r} = g^{qm}g^r = (g^m)^qg^r = 1^qg^r = g^r = g^{x\bmod m}$$
How is $g^m = 1$? Or is there an hypothesis missing? Such as $g$ is a generator.
Moreover, if I take $\mathbb{Z}^*_5$, then $2^5 = 2 \ne 1 = 2^{5\bmod 5}$
In a finite group $G$ of order $m$ we have $g^m=e$ for all $g\in G$. This follows from Lagrange's Theorem. A special case is for $G=(\mathbb{Z}/n\mathbb{Z})^{\times}$, of order $m=\phi(n)$, which is called Euler's Theorem.