The general, "If all you have is a hammer, everything looks like a nail" method requiring very little creative thinking is to use Lagrange multipliers.
(Note that there are some nontrivial conditions on when the method of Lagrange multipliers can be used; for example things get a bit messier if $\nabla g(x,y) = 0$ is possible when $g(x,y)=0$.)
You want to minimize $f(x,y) = x^2 + y^2$ subject to the condition $g(x,y)=x+y-10 = 0$. The point of using Lagrange multipliers is that you get simple conditions for the critical point of the constrained problem with the cost of having to add another unknown, $\lambda$, to the problem:
$$
\begin{align*}
\frac{\partial}{\partial x} f(x,y) &= \lambda \frac{\partial}{\partial x} g(x,y), \\
\frac{\partial}{\partial y} f(x,y) &= \lambda \frac{\partial}{\partial y} g(x,y), \\
g(x,y) &= 0.
\end{align*}
$$
Plugging in $f$ and $g$ there gives
$$
\begin{align*}
2x &= \lambda, \\
2y &= \lambda, \\
x+y - 10 &= 0,
\end{align*}
$$
which is a system of linear equations for $3$ variables, giving you $x=y=5$.
This method might seem like an overkill for such a simple problem, but once you're familiar with it, it's quite straightforward and effortless to write down the equations.