Example 8 If for all $\theta \in \mathbf{R}$, the complex number
$$
z=(a+\cos \theta)+(2 a-\sin \theta) \mathrm{i}
$$

has a modulus not exceeding 2, then the range of the real number $a$ is
$\qquad$ [6]
Let $\left\{\begin{array}{l}x=a+\cos \theta, \\ y=2 a-\sin \theta .\end{array}\right.$ Then $\left\{\begin{array}{l}x^{2}+y^{2} \leqslant 2^{2}, \\ (x-a)^{2}+(y-2 a)^{2}=1 .\end{array}\right.$ As shown in Figure 8, establish a complex plane, and take $Z(x, y), P(a, 2 a)$.

Then point $P$ lies on the line $y=2 x$, and $Z$ lies on the circle $D(P, 1)$, and within the circle $D(O, 2)$ (including the boundary).

From the problem, we know that the circle $D(P, 1)$ is contained within the circle $D(O, 2)$ (excluding the boundary).

Take two unit circles that are internally tangent to the circle $D(O, 2)$, denoted as $\odot P_{1}$ and $\odot P_{2}$, where points $P_{1}$ and $P_{2}$ lie on the line $y=2 x$.
It is easy to see that $P_{1}\left(-\frac{1}{\sqrt{5}},-\frac{2}{\sqrt{5}}\right), P_{2}\left(\frac{1}{\sqrt{5}}, \frac{2}{\sqrt{5}}\right)$.
Therefore, $a \in\left(-\frac{\sqrt{5}}{5}, \frac{\sqrt{5}}{5}\right)$.