What is a (simple) example of a group $G$ with an endomorphism $G\rightarrow G$ That is surjective, but not injective?
Let $G= H^\infty$ for some non-trivial group $H$ (like $\Bbb Z$ or $\Bbb Z_2$), and let $\phi:G\to G$ be given by. $$ \phi(h_1,h_2,h_3,\ldots )=(h_2,h_3,\ldots) $$
There are no examples with $G$ finite. So you need $G$ to be infinite.
Consider the set of all polynomials with rational coefficients as an additive group.
Then the derivation map $p\mapsto p'$ is a surjective, but not injective, endomorphism.
Or consider the set of complex numbers of modulus $1$ as a multiplicative group.
Then the square map $z\mapsto z^2$ is a surjective, but not injective, endomorphism.