For every element $g$ in a group $G$ of order $23$, prove that there is $h\in G$ such that $g=h^2$.
I am not sure how to prove this. I think that, since $G$ has prime order is isomorphic to a cyclic group and therefore abelian. I can use that property to prove that $g=h^2$ but i am not sure how. Any help will be appreciated.
I shall prove a general result. First, we say that an element $g$ of a group $G$ is a square if $g=h^2$ has a solution $h\in G$.
Let $n:=|G|$. Write $e$ for the identity of $G$. Recall that $g^n=e$ for all $g\in G$.
If $n$ is odd, then for every element $g\in G$, $$g=g\cdot e=g\cdot g^n=g^{n+1}=g^{2\left(\frac{n+1}{2}\right)}\,.$$ Thus, $h:=g^{\frac{n+1}{2}}$ is a solution to $h^2=g$.
Conversely, suppose that $n$ is even. Then, let $g\in G$ be an element of $G$ such that the order $t$ of $g$ in $G$ is maximally even (that is, if $t=2^ks$ where $k,s\in\mathbb{Z}_{\geq 0}$ with $s$ odd, then no other element $g'$ of $G$ is of order divisible by $2^{k+1}$). We know $k\geq 1$ due to Cauchy's Theorem. If $g=h^2$ for some $h\in G$, then $h$ has order $2t$, which contradicts the choice of $g$. Therefore, $g$ is not a square.