Well the aim is to go from something you don't know a priori the behaviour to something you are able to deal with.
So any rough inequality will do, and I would say the simpler the better.
In our case $\cos$ is a bounded function of $[-1,1]$ so $0\le \cos^2 n\le 1$, and we have gone from something which depends of $n$ to constants, this is far better.
Finally the author gets to $0\le a_n\le \dfrac 1{2^n}$, but you could argue, that it is still too complicated and could say that $2^n > n$ so that $0\le a_n\le \dfrac 1n$ and now you can apply the squeeze theorem with an even simpler statement.
You have big freedom in your choices when reducing inequalities.
For instance lets take $b_n = \dfrac{n^2+1}{n^3+2^n}$ still obviously converging to $0$.
- first try could be $n^2+1<2n^2\quad$ and $\quad n^3+2^n>2^n$
so you get $\quad 0\le b_n\le\dfrac{2n^2}{2^n}\quad$ you can now conclude saying $2^n\gg n^2$.
- but what about the very basic $2^n>n$ and then $0\le b_n\le \dfrac{n^2+1}{n^3+n}=\dfrac 1n$
You see that the inequality we have chosen is not the most precise, we have now something that converges slowly to $0$ compared to $\dfrac{n^2}{2^n}$ yet it is quite enough to conclude.
You will say, you cheated it works because there was $n^2+1$ on numerator and it simplified, what if there was $n^2+3$ instead?
Well then just go $3<n^2$ and $2^n>0$ (at least for $n$ large enough) so that $\dfrac{n^2+3}{n^3+2^n}\le \dfrac{2n^2}{n^3}=\dfrac 2n$ and you still can conclude.
You see that we madly replaced the most contributing term $2^n$ by just $0$, yet it does not change our conclusion.
In these matters, you have to go straight for maximum simplification, if you still can conclude then it was adequate. If you reach an undetermined limit then and only then go for more precise inequalities...