Bott and Tu use the fibration $\Omega S^2 \to PS^2 \to S^2$ to compute the cohomology of $\Omega S^2$. They do this by looking at the (Serre?) spectral sequence. Then $E_2^{p,q} = H^p(S^2,H^q(\Omega S^2))$.
They claim that by the universal coefficient theorem, all columns in $E_2$ except when $p=0$ or $p=2$ are zero, but I don't see how this is being applied. Could someone give a more detailed explanation?
Recall that $H_p(S^2;\mathbb{Z})$ is $\mathbb{Z}$ when $p=0,2$ and trivial otherwise.
The universal coefficient theorem gives a short exact sequence
$$0 \to \text{Ext}(H_{p-1}(S^2;\mathbb{Z}),G)\to H^p(S^2;G)\to \text{Hom}(H_p(S^2;\mathbb{Z}),G)\to 0 $$
Whatever $G=H^q(\Omega S^2;\mathbb{Z})$ may be:
The exactness of the sequence then implies that
$$E_2^{p,q}=H^p(S^2;G)\cong \begin{cases} \text{Hom}(\mathbb{Z},G)=G,& \text{if } p = 0,2\\ \text{Hom}(0,G)=0, & \text{otherwise} \end{cases}$$
Therefore the only possible non-zero terms are located at the $E_2^{0,*}$ or the $E_2^{2,*}$ columns.