Example 1 In the sequence $\left\{a_{n}\right\}$,
$$
\begin{array}{l}
a_{1}=2, \\
a_{n+1}=(\sqrt{2}-1)\left(a_{n}+2\right)(n=1,2, \cdots) .
\end{array}
$$

Find the general term formula of $\left\{a_{n}\right\}$.
(2007, National College Entrance Examination I Paper (Science))
From the given, we know
$$
a_{n+1}=(\sqrt{2}-1) a_{n}+2(\sqrt{2}-1),
$$

which means $a_{n+1}-\sqrt{2}=(\sqrt{2}-1)\left(a_{n}-\sqrt{2}\right)$.
Therefore, the sequence $\left\{a_{n}-\sqrt{2}\right\}$ is a geometric sequence with the first term $2-\sqrt{2}$ and the common ratio $\sqrt{2}-1$.

Thus, $a_{n}-\sqrt{2}=\sqrt{2}(\sqrt{2}-1)^{n}$, which means the general term formula for $a_{n}$ is
$$
a_{n}=\sqrt{2}\left[(\sqrt{2}-1)^{n}+1\right](n=1,2, \cdots) .
$$