Prove that a cyclic group with only one generator can have at most 2 elements

Perhaps easier: if $g$ generates $G$, then so does $g^{-1}$. The hypothesis then implies that $g=g^{-1}$, so $g^2=1$. Done (either $g=1$ or not, in which case respectively the order of $G$ is $1$ or $2$).


Your proof is correct if $G$ is finite, i.e. $G\cong\mathbb{Z}_m$ for some $m\ge 1$. Just notice that it may happen that $G\cong\mathbb{Z}$; however, in this case $g$ and $g^{-1}$ are distinct generators and this concludes the proof.