I suppose there are many ways to prove it.
Lemma: Let $X$ be a $T_1$ space and let $f:X\to Y$ be a continuous surjection. Let $D$ be a closed discrete subspace of $Y.$ Then $X$ has a closed discrete subspace $C$ with $|C|=|D|.$
Proof of Lemma: For $d\in D$ choose $g(d)\in f^{-1}\{d\}$ and let $C=\{g(d):d\in D\}.$ Since $f$ is continuous and $D=Cl_Y(D)$ we have $Cl_X(C)\subset Cl_X(f^{-1}D)=f^{-1}D.$
So for $c\in Cl_X(C)$ we have $f(c)\in D$. Now $(Y$ \ $D)\cup \{f(c)\}$ is open in $Y ,$ so, by continuity of $f$ the set $$U_c=f^{-1}((Y \setminus D)\cup \{f(c)\})$$ is a nbhd, in $X,$ of $c$. And $U_c\cap C=\{g(f(c))\}.$
So any $c\in Cl_X(C)$ has a nbhd $U_c$, in $X,$ that contains just $1$ member of $C.$ Since $X$ is a $T_1$ space, therefore $c\in C.$
So $C=Cl_X(C).$
Also $ U_c\cap C$ is open in the sub-space $C$, and $c\in U_c\cap Cl_X(C)=U_c\cap C =\{g(f(c)\}$ so $\{c\}=\{g(f(c))\}$ is open in the sub-space $C$. QED.
Application of the Lemma: $\{1/2\}\times [0,1]$ is an uncountable closed discrete sub-space of the lexicographic square $I^2.$ If $f :I\to I^2$ were a continuous surjection then $I$ would have an uncountable closed discrete sub-space. But it doesn't.