Suppose $X, Y$ are $S$-schemes and $S'\to S$ is a morphism. Every $S$-morphism $f:X\to Y$ gives rise to a $S'$-morphism $f':X'\to Y'$ (where $f'$, $X'$, $Y'$ are the base changes).
Under which assumptions is $Mor_S(X,Y)\to Mor_{S'}(X',Y')$ surjective? Is it possible to specify properties of $X$ and/or $Y$ and/or $S'\to S$ which guarantee surjectivity?
(Sorry for the vague question. I don't have a particular setting in mind, any example is appreciated.)
Here is an example showing that in general surjectivity does not hold. Take: $$S=\operatorname {Spec}\mathbb R,\quad S'=\operatorname {Spec}\mathbb C, \quad X=\mathbb A^1_\mathbb R=\operatorname {Spec}\mathbb R[t],\quad Y=\operatorname {Spec}(\frac {\mathbb R[x,y]}{\langle x^2+y^2+1\rangle})$$
Then $Mor_S(X,Y)=\emptyset$ because at the level of rings there is no $\mathbb R-$ algebra morphism $$\frac {\mathbb R[x,y]}{\langle x^2+y^2+1\rangle} \to \mathbb R[t]$$
However $X'=\mathbb A^1_\mathbb C=\operatorname {Spec}\mathbb C[t],\quad Y'=\operatorname {Spec}(\frac {\mathbb C[x,y]}{\langle x^2+y^2+1\rangle})$ and now there are many $S'$-morphisms $X'\to Y'$ corresponding to the many $\mathbb C$-algebra morphisms $$ \frac {\mathbb C[x,y]}{\langle x^2+y^2+1\rangle} \to \mathbb C[t]$$
Conclusion
The natural map $$Mor_S(X,Y)=\emptyset \to Mor_{S'}(X',Y')\neq \emptyset$$ cannot be surjective