In a finite cyclic group, the generator has the order of the group

If $g\in G$ has order $k$ then set $\left\{ e,g,\ldots,g^{k-1}\right\} $ has distinct elements and $\left\{ g^{i}\mid i\in\mathbb{Z}\right\} =\left\{ e,g,\ldots,g^{k-1}\right\} $. Here $e$ stands for the identity of $G$.

If secondly $G$ is generated by $g$ then $G=\left\{ g^{i}\mid i\in\mathbb{Z}\right\} =\left\{ e,g,\ldots,g^{k-1}\right\} $ and consequently $\left|G\right|=k$, i.e., the order of $G$ is exactly the order of $g$.