Suppose that $X\subset\mathbb{R}^n$ be open. How can I find a sequence of subsets $X_1,X_2,\cdots,X_n,\cdots$ of $X$ such that
(1) $X_n$ is open and $\overline{X_n}$ is compact for every $n$.
(2) $\overline{X_n}\subset X_{n+1}$
(3) $\bigcup_{n=1}^{\infty}X_n=X$.
The set of open balls $\{B(q, r) \mid (q,r) \in \mathbb Q^2\}$ is countable as $\mathbb Q$ is countable. Let say that $\mathcal B = \{B(q_n,r_n) \mid n \in \mathbb N\}$ enumerates it.
Now for each $x \in X$, you can find $n(x) \in \mathbb N$ such that $x \in B(q_{n(x)}, r_{n(x)}) \subseteq B(q_{n(x)}, 2r_{n(x)}) \subseteq X$. As $\mathcal B$ is countable, so is $\mathcal B_X = \{B(q_{n(x)}, r_{n(x)}) \mid x \in X\}$ that we can denote $\{\omega_n \mid n \in \mathbb N\}$. We have $\cup \mathcal B_X = X$.
Now let's build $X_n$ by induction.
We take $X_0= \omega_0$. $X_0$ is open and $\overline{\omega_0}$ compact.
Suppose that we've built $X_n$ satifying the required hypothesis. As $\overline{X_n} \subseteq X$ is supposed to be compact, and $\mathcal B_X$ is an open cover, we can extract a finite subcover $\omega_{i_1}, \dots , \omega_{i_p}$. We then define $X_{n+1}= \left(\cup_{k=1}^p \omega_{i_k}\right) \cup \omega_{n+1}$.
$X_{n+1}$ contains $\overline{X_n}$ as $\cup_{k=1}^p \omega_{i_k}$ does. $\overline{X_{n+1}}$ is compact. And we have $\bigcup_{n=1}^{\infty}X_n=X$ as $\cup \mathcal B_X = X$. So we're done.