Definition
A subset $Y$ of a topological space $X$ is said nowhere dense if $\operatorname{int}(\operatorname{cl} Y)$ is empty.
Now let be $X$ a compact topological space and thus let be $$ \mathcal Y:=\{Y_n:n\in\omega\} $$ a countable collection of nowhere dense subsets of $X$. So I am searching to prove that $X\setminus\bigcup\cal Y$ is dense in $X$ using the following hint given by my topology text.
Hint: So given an open subset $A$ we suppose that $$ \mathcal A:=\{A_n:n\in\omega\} $$ is a countable collection of nonempty open sets such that $$ A_1\subseteq\operatorname{cl}A_1\subseteq A $$ and in particular such that $$ \operatorname{cl}A_{n+1}\subseteq A_n\quad\text{and}\quad A_n\cap Y_n=\emptyset $$ for each $n\in\omega$
So we observe that the inclusion $$ \operatorname{cl}A_{n+1}\subseteq A_n\subseteq\operatorname{cl}A_n $$ proves that the collection $$ \overline{\mathcal A}:=\{\operatorname{cl}A_n:n\in\omega\} $$ is a collection of closed sets with the finite intersection property so that by compactness $\bigcap\overline{\mathcal A}$ is a nonempty subset of $A$ and thus in particular also $$ \bigcap_{n\in\omega}\operatorname{cl}A_{n+1} $$ is a nonempty subset of $A$.
Now we observe that the if $Y_n$ and $A_n$ are disjoint for each $n\in\omega$ then the inclusion $$ \operatorname{cl} A_{n+1}\subseteq A_n\subseteq X\setminus Y_n $$ holds for any $n\in\omega$ and thus we conclude that also the inclusion $$ \bigcap_{n\in\omega}\operatorname{cl}A_{n+1}\subseteq\bigcap_{n\in\omega}X\setminus Y_n=X\setminus\bigcup_{n\in\omega} Y_n $$ holds and this proves that $A$ is not disjoint from $X\setminus\bigcup\mathcal Y$ so that this is dense.
So I tried to make the collection $\cal A$ as follows. First of all I observe that a finite union of nowhere dense sets is nowhere dense so that $\bigcup_{i\in n} Y_i$ is nowhere dense for each $n\in\omega$ and thus $A$ is not contained in $\bigcup_{i\in n}\operatorname{cl} Y_i$ so that $$ A\cap\biggl(\bigcap_{i\in n}(X\setminus \operatorname{cl}Y_i)\biggl)=A\cap\biggl(X\setminus\bigcup_{i\in n}\operatorname{cl}Y_i\biggl)\neq\emptyset $$ Therefore I thought to put $$ A_n:=A\cap\biggl(\bigcap_{i\in n}(X\setminus \operatorname{cl}Y_i)\biggl) $$ for each $n\in\omega$ but unfortunately I was not able to prove that the last position works so that I thought to put a specific question. So could someone help me, please?