If $X$ is a metrizable space that is not compact, then there it has a countably infinite closed discrete subset $Y$. This follows immediately from the fact that a metrizable space is compact iff it is sequentially compact. Since $X$ is not compact, it is not sequentially compact, and there is therefore a sequence $\sigma=\langle x_n:n\in\Bbb N\rangle$ in $X$ with no convergent subsequence; let $Y=\{x_n:n\in\Bbb N\}$.
Let $x\in X$ be arbitrary; $\sigma$ has no subsequence converging to $x$, so there are an open nbhd $V_x$ of $x$ and an $m_x\in\Bbb N$ such that $x_n\notin V_x$ whenever $n\ge m_x$. Clearly $V_x\cap Y$ is finite, so $F_x=(V_x\cap Y)\setminus\{x\}$ is closed, and $U_x\triangleq V_x\setminus F_x$ is an open nbhd of $x$. $U_x\cap Y=\varnothing$ if $x\notin Y$, and $U_x\cap Y=\{x\}$ if $x\in Y$, so $Y$ is closed and discrete. If $Y$ were finite, there would be a $y\in Y$ such that $A\triangleq \{n\in\Bbb N:x_n=y\}$ was infinite; but then $\langle x_n:n\in A\rangle$ would be a subsequence of $\sigma$ converging to $y$, contradicting the choice of $\sigma$.