I need to prove the following:
Let $G$ be a group. Then it's simple if and only if there is only surjective homomorphism $G \to G'$ for $G' = \{ e \}$ or $G' \cong G$.
Not sure how to approach this problem. So far I only have proved that if $G$ is simple and a homomorphism is surjective, then so is $G'$, but I'm not sure this is relevant.
The question is not a duplicate, since it also asks how to prove ($G$ is simple, $\phi: G \to G'$ is a surjective homomorphism) $\Rightarrow$ ($G' = \{ e \}$ or $G' \cong G$).
This is not true. It holds for finite groups, but not in general.
The issue is that a surjective homomorphism $G\rightarrow G$ need not be an isomorphism. If there exists a non-injective surjective homomorphism $G\rightarrow G$ then $G$ is called non-Hopfian. See here for more details and explicit examples (easiest example: $\mathbb{Z}\times\mathbb{Z}\times\mathbb{Z}\times\cdots$).
The Prüfer group $\mathbb{Z}[\frac{1}{p}]/\mathbb{Z}$ gives a couner-example to your specific question: it is not simple, but all homomorphic images are either isomorphic to itself or are trivial (see here).
If you restate your question to be about finite groups instead then it is a relatively straight-forward exercises on the first isomorphism theorem, as the comments and the other answer are getting at.