Localization of sheaves Let $(X,\mathscr{O}_X)$ a ringed space and $\mathscr{F}$ an $\mathscr{O}_X$-module. Let $U\subseteq X$ be an open subset, and suppose we have $\mathscr{F}|_U=\mathscr{O}_U$, then for $x\in U$, how does this imply $\mathscr{F}_x=\mathscr{O}_{X,x}$? The explanation I saw was "because localization preserves exactness", but I don't quite understand how does it work here. Can somebody explain?

It depends on how much formality you have seen but for me the most satisfying proof is:
let $j: U \rightarrow X$ be the inclusion and $i: \{\star \} \rightarrow U$ of image $x$. We have pullback functors $$j^{-1}: Sh(X) \rightarrow Sh(U) \\ i^{-1}: Sh(U) \rightarrow Sh(\{\star\}) \\
(j \circ i)^{-1}: Sh(X) \rightarrow Sh(\{\star\}).$$
And they are compatible with composition: $i^{-1} \circ j^{-1} = (j \circ i)^{-1}$.
By definition $\mathcal{F} \vert_U = j^{-1} \mathcal{F}$ and $O_U = j^{-1}O_X$.
Hence $\mathcal{F}_x = (j \circ i)^{-1} \mathcal{F} = i^{-1} \circ j^{-1} \mathcal{F} = i^{-1} \circ j^{-1} O_X = (j \circ i)^{-1} O_X = O_{X,x}$
