Let V $\subset$ U open sets of $\mathbb{R}^d$, then $\phi: C^{\infty}(U) \to C^{\infty}(V)$ such that $\phi(f) = f\mid_{V}$ is not a surjective function.
I've been trying to prove this but I don't have any intuition as to why this should be true.I expect $C^{\infty}(U)$ to be "bigger" than $C^{\infty}(V)$ because $V \subset U$ so it really doesn't make sense that such a function is never surjective.
Simplest case: $d=1$, $V=(0,1)$, $U=(-1,2)$. Then $f(x)=\frac1x$ is not the restriction of any smooth function with domain $U$.
Restriction is however surjective in the degenerate case when $V=\emptyset$, or when $U$ is not connected and $V$ is a connected component of $U$.