This question is about the analogy between number fields and function fields. It's a soft question and the title misrepresents the question.
Consider the projective line over a field. This has many endomorphisms of degree $>1$, e.g., $x\mapsto x^n$.
Now, a well-known analogy states that $\mathbf{P}^1_{\mathbf{F}_p}$ is "similar" to Spec $\mathbf{Z}$.
But $\mathbf{Z}$ has no endomorphisms. I don't know really how to phrase this question, but here the analogy seems to break down and I was just wondering why.
If I'm not mistaken, for any number ring $O_K$, every endomorphism is an automorphism.