I am having fundamental struggles in understanding the proof on stacks projects. Ironically, what I don't understand is the "clearly" part of the statement. More precisely:
Lemma 25.4.6 Let $X,Y$ be locally ringed let $I \subseteq O_X$ be a sheaf of ideals locally generated by sections. Let $i:Z \rightarrow X$ be the support of the sheaf of rings $O_X/I$. Then if $f:Y \rightarrow X$ factors through $Z$, the map $f^*I \rightarrow f^* O_X \simeq O_Y$ is zero.
Denote $i: Z \to X$ the closed immersion, assume $f$ factors as $i \circ g$ with $g: Y \to Z$, then $f^* = g^* \circ i^* $. So it suffice to show this with $f = i$, that is, the map $i^*\mathcal{I} \to i^*\mathcal{O}_X = \mathcal{O}_Z$ is zero.
It then suffices to show that $(i^*\mathcal{I})_x = 0$ for every stalk. But $(i^*\mathcal{I})_x = \mathcal{I}_{i(x)}\otimes_{\mathcal{O}_{X,i(x)}}\mathcal{O}_{Z,x}$ (see here). And $O_{Z,x}$ is $\mathcal{O}_{X,i(x)}/\mathcal{I}_{i(x)}$. So this tensor product is null, and $i^*\mathcal{I}$ is zero on every stalk. Hence the map $i^*\mathcal{I} \to i^*\mathcal{O}_X$ must be zero..