Theorem. Let $p\in[1,+\infty]$ and $M\subset\ell_p$ is bounded subset such that
$$
\lim\limits_{N\to\infty}\sup\{\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p:x\in M\}=0
$$
then $M$ is totally bounded.
Proof. Take arbitrary $\varepsilon>0$ then there exist $N\in\mathbb{N}$ such that for all $x\in M$ we have
$$
\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p<\varepsilon/2\tag{1}
$$
Since $M$ is bounded, the set
$$
M_{reduced}=\{(x_1,x_2,\ldots,x_N,0,0,\ldots):x\in M\}
$$
is bounded. But $M_{reduced}$ is a bounded subset of $\mathbb{R}^N$ so we can find finite $\varepsilon/2$-net $N\subset \ell_p$. This is possible because all norms on finite dimensional spaces are equivalent to euclidean norm, and sets bounded in euclidean norm are always totally bounded. We claim that $N$ is a finite $\varepsilon$-net for $M$. Take arbitrary $x\in M$ and consider $x_{reduced}=(x_1,x_2,\ldots,x_N,0,0\ldots,)\in M_{reduced}$. Then there exist $y\in N$ such that $\Vert x_{reduced}-y\Vert_p<\varepsilon/2$. Then using $(1)$ we get
$$
\Vert x-y\Vert_p\leq\Vert x-x_{reduced}\Vert_p+\Vert x_{reduced}-y\Vert_p<
\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p+\varepsilon/2<\varepsilon
$$
Since $x\in M$ is arbitrary, then $N$ is an $\varepsilon$-net for $M$. Since $\varepsilon>0$ is arbitrary and by construction $N$ is finite, then $M$ is totally bounded.
Theorem. Let $1\leq p\leq +\infty$ and $a\in \ell_p \cap c_0$, then the set
$$
C=\{x\in\ell_p:\;\forall n\in\mathbb{N}\quad|x_n|\leq |a_n|\}
$$
is compact.
Proof. We need to show that $C$ is complete and totally bounded
1) Completeness. Since $C$ is a subset of complete space $\ell_p$, it is enough to show that $C$ is closed. Consider continuous linear functionals $f_n:\ell_p\to\mathbb{R}:x\mapsto x_n$. Since $|f_n(x)|=|x_n|\leq\Vert x\Vert_p$ for all $x\in\ell_p$, then $f_n$ is continuous and obviously linear. Hence $f_n^{-1}([-a_n,a_n])$ is a closed set as preimage of closed set. Note that
$$
C=\bigcap\limits_{n\in\mathbb{N}}f_n^{-1}([-a_n,a_n])
$$
so $C$ is closed as intersection of closed sets.
2) Total boundedness. From the formula of the norm in $\ell_p$ it follows that for all $x\in C$ we have $\Vert x\Vert_p\leq\Vert a\Vert_p$, so $C$ is bounded. By the same reasonong for all $x\in C$ we have
$$
\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p\leq
\Vert (0,0,\ldots,0,a_N,a_{N+1},\ldots) \Vert_p
$$
Hence
$$
\lim\limits_{N\to\infty}\sup\left\{\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p:x\in C\right\}\leq
\lim\limits_{N\to\infty}\Vert (0,0,\ldots,0,a_N,a_{N+1},\ldots) \Vert_p=0
$$
Since $a\in\ell_p\cap c_0$ then the last limit is $0$, so
$$
\lim\limits_{N\to\infty}\sup\left\{\Vert (0,0,\ldots,0,x_N,x_{N+1},\ldots) \Vert_p:x\in C\right\}=0
$$
Thus from previous theorem we see that $C$ is totally bounded.