Example 1 Suppose $x$ varies from 0 to $2 \pi$, find the change in the value of $y=\sin ^{2} x-3 \sin x+2$.
Solve $f(t)=t^{2}-3 t+2$ is monotonically decreasing on $[-1,1]$, $y=f(t)$. Let $t=\sin x$, then when $x$ changes from 0 to $\frac{\pi}{2}$, $t$ increases from 0 to 1, $y$ decreases monotonically from $f(0)$ to $f(1)$, i.e., from 2 to 0; when $x$ changes from $\frac{\pi}{2}$ to $\frac{3 \pi}{2}$, $t$ decreases from 1 to -1, $y$ increases monotonically from $f(1)$ to $f(-1)$, i.e., from 0 to 6; when $x$ changes from $\frac{3 \pi}{2}$ to $2 \pi$, $t$ increases from -1 to 0, $y$ decreases monotonically from $f(-1)$ to $f(0)$, i.e., from 6 to 2.