As I said in the comments, this could be done more in general, but I am going to show it for $S^{\infty}$ so you get the idea.
Suppose you have a compact subset $A$ of $S^{\infty}$. If $A$ is finite, then it is clearly contained in some $S^n$. So assume that $A$ is infinite and that it is not contained in any $S^n$.
Since $A$ is not contained in $S^1$, there is $x_1 \in A$ which is not in $S^1$. Say $x_1 \in S^{m_1}$. Since $A$ is not contained in $S^{m_1}$, there is $x_2 \in A$ which is not in $S^{m_1}$. In particular $x_1 \neq x_2$. Since $A$ is infinite we can continue this process and get a subset $B= \{ x_i \}$ of $A$ with $x_i \in S^{m_i} - S^{m_{i-1}}$ and where $m_1 < m_2 < m_3 < \ldots$ And in particular all the $x_i$ are different, so $B$ is infinite.
Note that $B \cap S^n$ is either empty or finite, hence $B \cap S^n$ is closed in $S^n$ for all $n$. Therefore $B$ is closed in $S^{\infty}$ and so it is closed in $A$. Since $A$ is compact, $B$ has to be compact.
Take any element $x_j$ of $B$. The complement $ C = B - \{x_j\}$ also satisfies that $C \cap S^n$ is closed in $S^n$ for all $n$. Therefore $C$ is closed in $S^{\infty}$, hence it is closed in $B$. So $\{ x_j \}$ is open in $B$. This means that $B$ has the discrete topology, every subset of $B$ is open.
Since $B$ has the discrete topology and it is compact, it has to be finite. But this is a contradiction with $B$ being infinite. Therefore $A$ had to be contained in some $S^n$.