Example 3 The system of equations $\left\{\begin{array}{l}x+y=2, \\ x y-z^{2}=1\end{array}\right.$ has how many sets of real solutions?
Given
\[
\left\{\begin{array}{l}
x+y=2, \\
x y=z^{2}+1,
\end{array}\right.
\]
we are reminded of the inverse of Vieta's formulas. By the inverse of Vieta's formulas, $x$ and $y$ are the two real roots of the equation
\[
t^{2}-2 t+\left(z^{2}+1\right)=0.
\]
Then,
\[
\Delta=(-2)^{2}-4\left(z^{2}+1\right) \geqslant 0 \Rightarrow z^{2} \leqslant 0.
\]

Since $z^{2} \geqslant 0$, it follows that $z=0$.
Thus, $t^{2}-2 t+1=0$.
Therefore, $x=y=1$.
Hence, the original system of equations has only one real solution.