I have a specific example below and i think my proof is wrong because it seems too simple, it would work for the general case which I doubt is true. I would also be interested in the general answer as well; when is the product of closed sets closed in the product topology?
Show that the set $ \prod_{\alpha\in\mathbb{R}} \mathbb{N} $ is a closed subset of the topological space $ \prod_{\alpha\in\mathbb{R}} \mathbb{R} $ (endowed with the product topology)
My attempt: $\mathbb{N}$ is a closed subspace of $\mathbb{R} $ with the canonical topology. In particular, $\overline{\mathbb{N}}=\mathbb{N}$. Also since we are in the product topology, it a known fact that closure of a product is the product of the closures. These 2 facts together mean $$ \overline{ \prod_{\alpha\in\mathbb{R}} \mathbb{N} }= \prod_{\alpha\in\mathbb{R}} \overline{\mathbb{N}} = \prod_{\alpha\in\mathbb{R}} \mathbb{N} $$ Since $ \prod_{\alpha\in\mathbb{R}} \mathbb{N} $ contains its closure, it is closed