I wonder if my proof of the above statement is correct. I did not find my proof in the linked answers, so now I am not sure if it is correct because it seems to be a little bit too easy.
Let be $f \colon M \to M$ a surjective endomorphisms of an $R$-module $M$. Then $M$ is an $R[x]$-module by letting $x$ act as $f$. Consider the ideal $I=(x)$. Then $IM=M$ holds since $f$ is surjective and $x \in I$. We can apply Nakayama's lemma because $M$ is a finitely generated $R[x]$-module. It follows that there exists an element $g \equiv 1 \ (\mathrm{mod}\ I)$ such that $gM=0$. Because $g \equiv 1 \ (\mathrm{mod}\ I)$ means that $g$ has constant term equal to $1$, it follows $n = 0$ for every $n \in \ker f$.
Surjective endomorphisms of finitely generated modules are isomorphisms
Surjective endomorphisms of finitely generated modules are injective