Here is Prob. 10, Sec. 30, in the book Topology by James R. Munkres, 2nd edition:
Show that if $X$ is a countable product of spaces having countable dense subsets, then $X$ has a countable dense subset.
My Attempt:
Let $X_1, X_2, X_3, \ldots$ be any countably many topological spaces having countable dense subsets $D_1, D_2, D_3, \ldots$, respectively, and let us put $$ \mathbf{X} \colon= X_1 \times X_2 \times X_3 \times \cdots. \tag{Definition 0} $$
For each $n \in \mathbb{N}$, let $p_n$ be some given point of $X_n$.
Now let us put $$ D_{n_1, \ldots, n_r}^\prime \colon= D_1^\prime \times D_2^\prime \times D_3^\prime \times \cdots, \tag{Definition 1} $$ where $D_n^\prime \colon= D_n$ for finitely many $n = n_1, \ldots, n_r$, and $D_n \colon= \left\{ p_n \right\}$ for all other valuse of $n$.
Then let $$ \mathbf{D} \colon= \bigcup_{r \in \mathbb{N}} \bigcup_{n_1, \ldots, n_r \in \mathbb{N}} D_{n_1, \ldots, n_r}^\prime. \tag{Definition 2} $$
The set $\mathbf{D}$ is a countable union of countable subsets of $\mathbf{X}$ and is thus itself a countable subset of $\mathbf{X}$.
We now show that $\mathbf{D}$ is dense in $\mathbf{X}$, that is, we show that $$ \overline{\mathbf{D}} = \mathbf{X}. \tag{0} $$
Let $\mathbf{x} \colon= x_1 \times x_2 \times x_3 \times \cdots$ be any point of $X$, and let $$ \mathbf{B} \colon= B_1 \times B_2 \times B_3 \times \cdots \tag{Definition 3} $$ be any basis set for the product topology on $X$ such that $\mathbf{x} \in \mathbf{B}$; let $n = n_1, \ldots, n_r$ be the finitely many indices for which $B_n$ is an open set of $X_n$ and let $B_n = X_n$ for all other values of $n$.
For each $i = 1, \ldots, r$, as $D_{n_i}$ is dense in $X_{n_i}$ that is $\overline{D_{n_i}} = X_{n_i}$, so $x_{n_i} \in \overline{D_{n_i}}$, and since $B_{n_i}$ is an open set of $X_{n_i}$ containing $x_{n_i}$, therefore we can conclude that $$ B_{n_i} \cap D_{n_i} \neq \emptyset, \tag{1} $$ and thus there exists a point $y_{n_i} \in X_{n_i}$ such that $$ y_{n_i} \in B_{n_i} \cap D_{n_i}. \tag{Definition 4*} $$
Now let $$ \mathbf{y} \colon= y_1^\prime \times y_2^\prime \times y_3^\prime \times \cdots \in X, \tag{Definition 4} $$ where $y_{n_i}^\prime \colon= y_{n_i}$ for $i = 1, \ldots, r$, and $y_n^\prime \colon= p_n$ for all other values of $n$.
This point $\mathbf{y} \in \mathbf{B} \cap \mathbf{D}$. [Please refer to (Definition 2), (Definition 3), and (Definition 4), and (Definition 4*) above. ] Thus $$ \mathbf{B} \cap \mathbf{D} \neq \emptyset. \tag{2} $$
Thus for any basis set $\mathbf{B}$ for the product topology on $\mathbf{X}$ such that $\mathbf{x} \in \mathbf{B}$, the relation (2) above holds. Thus we can conclude that $$ \mathbf{x} \in \overline{\mathbf{D}}. $$
But as $\mathbf{x} \in \mathbf{X}$ was arbitrary, we can conclude that (0) above holds.
Thus $\mathbf{X}$ has a countable dense subset $\mathbf{D}$. [Please refer to (Definition 0) and (Definition 2) above.]
Is this proof correct? If so, is my presentation clear enough? Or, are there errors or issues?
You're way overcomplicating it. Just define
$$ \mathbf{D}= \left\{ \left(x_n \right)_n \in \mathbf{X}: \exists N \in \mathbb{N}: \forall n: n \le N : x_n \in D_n \text{ and } \forall n > N x_n = p_n \right\}. $$ That is, let $$ \mathbf{D} \colon= \bigcup_{ n \in \mathbb{N} } \left( D_1 \times \cdots \times D_n \times \left\{ p_{n+1} \right\} \times \left\{ p_{n+2} \right\} \times \cdots \right) $$ which is countable (it's another way of describing your set) and intersects all non-empty basic open sets and so is dense.