I find it hard to quickly determine this. For instance,
$D^n/\{0\}=\{x \in \mathbb{R}^n| 0 < ||x|| \leq 1\}$ is non-compact.
$S^{n-1}=\{x \in \mathbb{R}^n | ||x||=1\}$ is compact.
So, okay, the first set is a punctured disc, it seems. So a disc, like a CD, with a hole at point $0$. The disc includes the boundaries, yes? but, why is it non-compact?
I'm not looking for a rigorous proof(at least for now). To simplify, let me set $n=2$. So I have a disc in a plane. With a hole of course.
The radius of the disc is $1$ so, well, how about I cover it with an ... open disc with radius $2$? That should suffice to cover(i.e. contain the punctured disc) and well it's just $1$ subset of $\mathbb{R}^n$ so it's also finite i.e. I have a finite subcover.
I can tell the second set is compact, since I can define a bunch of circles, i dunno, radius $1$ at points $1,-1$ on each $x,y$ axis. That would cover the entire circumference $S^{n-1}$ where $n=2$.
So, why is my cover of the punctured disc invalid?
The flaw with your proof is that you showed that one particular open cover has a finite subcover. To show compactness, you have to show that every open cover has a finite subcover. Suppose $A_n=\{x\in\mathbb R^n:1/n<\Vert x\Vert<2\}$. This is an open cover with no finite subcover, so $D^n\setminus\{0\}$ is not compact. Alternatively, you can see that $0$ is a boundary point, so $D^n\setminus\{0\}$ does not contain all of its boundary points, so it is not closed. By Heine-Borel, it is not compact.
The proof that $S^{n-1}$ is compact is flawed for the same reason. You showed one cover has a finite subcover, but all open covers have to have a finite subcover. I would suggest using the Heine Borel Theorem for this one too. The Heine Borel Theorem is very powerful, and works in $\mathbb R^n$ for all $n$. It proves immediately that $D^n\setminus\{0\}$ is not compact, while $S^{n-1}$ is.