Given a category $\mathcal{C}$, the functorial morphisms $\phi:\rm{id}_{\mathcal{C}}\rightarrow \rm{id}_{\mathcal{C}}$ define a monoid via $(\phi\circ \psi)_X := \phi_X\circ\psi_X$ for $X\in \rm{Ob}(\mathcal{C})$, where the unit is $\rm{id}_{\rm{id}_\mathcal{C}}:\rm{id}_{\mathcal{C}}\rightarrow \rm{id}_{\mathcal{C}}$, $ (\rm{id}_{\rm{id}_\mathcal{C}})_X := \rm{id}_X$.
The goal is to compute this monoid for the categories $\rm{Set}$, $\rm{Ring}$ and $R-\rm{Mod}$ for a given commutative ring $R$.
How do I approach this? For $\rm{Set}$, let $\phi$ be such a functorial morphism, $X,Y$ be any two sets. Then there is a commutative diagram such that $f\circ \phi_X = \phi_Y \circ f$ for every map $f:X\rightarrow Y$. I want to conclude some necessary properties of $\phi_X$ from this, but I don't know how yet.
If you take $X = *$, the one element set, then the commutative diagram of $\phi$ and $f$
becomes
since $\phi_X = \text{id}_X$. And thus since functions $* \rightarrow Y$ are in bijection with elements of $Y$ we can conclude that $\phi_Y$ has to fix every point in $Y$. Thus $\phi$ has to be the identity natural transformation. Essentially what we used here is that morphisms $* \rightarrow Y$ are in bijection with elements of $Y$.
You can also use the Yoneda lemma for this, the identity functor on $\text{Set}$ is naturally isomorphic to $\text{Hom}(*,-)$ and by yoneda lemma $\text{Nat}(\text{Hom}(*,-),\text{Hom}(*,-)) \approx \text{Hom}(*,*) \approx *$
In the case of the category $R-\text{Mod}$, what module $I$ has the property that module homomorphisms $I \rightarrow M$ are in bijection with elements of $M$? After you figure that out, $I$ should play a similar role in your argument as that of $*$ in $\text{Set}$. What do module homomorphisms $I \rightarrow I$ look like?