I found a answer here Every infinite Hausdorff space has an infinite discrete subspace but I don't understand why $X \setminus \bigcup_{i \in \mathbb{N}} \overline{U_i}$ open or not doesn't matter in that answer, any help thanks!
2 Answers
It doesn't matter. The property that is used in the answer is that $X \setminus \bigcup_{i=0}^n \overline{U_i}$ is open for each $n$. Actually, as shown in the comments to the answer, the set $X \setminus \bigcup_{i \in \mathbb{N}} \overline{U_i}$ is not necessarily open.
A different proof: Let $X$ be $T_2$ and infinite. Let $X^i$ be the set of isolated points of $X$. That is, $p\in X^i$ iff $\{p\}$ is open.
(i). Now $X^i$ is a discrete subspace of $X $. So if $X^i$ is infinite then we're done.
(ii). So suppose $X^i$ is finite.Then $X\setminus X^i\ne\emptyset.$ And because $X$ is $T_2$ and $X^i$ is finite, any nbhd of any $p\in X\setminus X^i$ contains some (infinitely many, in fact) $q$ with $p\ne q\in X\setminus X^i.$
So let $p_1\in X\setminus X^i$ and $U_1=X.$ Recursively, for $n\in \Bbb N,$ suppose $p_n\in X\setminus X^i,$ and $p_n\in U_n$ where $U_n$ is open and $U_n\cap \{p_j:j<n\}=\emptyset.$
Take $p_{n+1}\in U_n\setminus X^i$ with $p_{n+1}\ne p_n$ Take disjoint open subsets $V_n, U_{n+1}$ of $U_n$ with $p_n\in V_n$ and $p_{n+1}\in U_{n+1}.$
Then $p_n\not \in \overline {\{p_j:j\ne n\}}$ because the open set $V_n$ contains $p_n$ and we have $$V_n\cap \{p_j:j<n\}\subset U_n\cap \{p_j:j<n\}=\emptyset$$ while $$V_n\cap \{p_j:j>n\}\subset V_n\cap U_{n+1}=\emptyset.$$
So $\{p_n:n\in \Bbb N\}$ is an infinite discrete subspace of $X.$