I have a doubt about the last part of the proof of Lemma 1.10 in Introduction to smooth manifolds by John Lee, so I will put just the last part of the proof.
Lemma 1.10 Every topological manifold has a countable basis of precompact coordinate balls.
"[...] If $V \subset U_i$ is one of these balls (a coordinate ball that is precompact in $U_i$), then the closure of $V$ in $U_i$ is compact, and because $M$ is Hausdorff, it is closed in $M$. It follows that the closure of $V$ in $M$ is the same as its closure in $U_i$, so $V$ is precompact in $M$ as well." $\square$
I know that we need to prove that $\overline{V}$ is compact in $M$, but by the Lemma 26.1 of Munkres's book Topology, it is clear that if $\overline{V}$ is compact in $U_i$, then $\overline{V}$ is compact in $M$, isn't it? Why show that $\overline{V}$ is closed in $M$ ensure that $\overline{V}$ is compact in $M$? Thanks in advance!
Lemma 26.1 (Munkres) Let $Y$ be a subspace of $X$, then $Y$ is compact if and only if every covering $Y$ by sets open in $X$ contains a finite subcollection covering $Y$.