Let $(X,\mathcal{O}_X)$ be a scheme. For a fixed $x\in X$, let $Z:=\bigcap_{U\ni x}U$, where each $U$ is open in $X$. Prove that the scheme $(Z,\mathcal{O}_X\big|_Z)$ is isomorphic to $(\text{Spec}(\mathcal{O}_{X,x}),\mathcal{O}_{\text{Spec}(\mathcal{O}_{X,x})})$.
Here's where I'm at:
Because of the local nature of the problem, we may assume $X$ to be affine, say $X=\text{Spec}(A)$. Since the principal open sets are a basis of the topology, we may say $Z=\bigcap_{x\in X_f}X_f$, so $\mathfrak{p}\in Z\Leftrightarrow f\notin\mathfrak{p}$ for all $f\notin x\Leftrightarrow \mathfrak{p}\subset x$ and $Z=\{\mathfrak{p}\in X \mid \mathfrak{p}\subset x\}$. Then it's natural to define \begin{align*} \varphi:\text{Spec}(\mathcal{O}_{X,x})&\to Z\\ \mathfrak{p}\cdot \mathcal{O}_{X,x}&\mapsto \mathfrak{p} \end{align*}
which is easily seen to be a homeomorphism.
My difficulty is how to define the morphism of sheaves $\varphi^\#:\mathcal{O}_X\big|_Z\to \varphi_*\mathcal{O}_Y$, where $Y:=\text{Spec}(\mathcal{O}_{X,x})$. Since $\mathcal{O}_X\big|_Z$ is the sheafification of the pre-sheaf $\mathcal{F}$ on $Z$ given by $U\subset Z\mapsto \varinjlim_{V\supset U}\mathcal{O}_X(V)$, then I should define a morphism $\psi:\mathcal{F}\to \varphi_*\mathcal{O}_Y$ in order to obtain a morphism $\mathcal{O}_X\big|_Z\to \varphi_*\mathcal{O}_Y$ by the universal property.
How am I supposed to define $\psi$?