Assume all spaces are separable metric.
We know that a countable union of zero dimensional spaces is zero dimensional.
We also know that a countable (finite, in fact) union of totally disconnected spaces can be connected.
But what if the spaces are all closed?
Still the union can be connected: If $X$ is the Knaster-Kuratowski fan in $[0,1]^2$ with base Cantor set along the $x$-axis and vertex point $(1/2,1)$ then take $F_0=\{(1/2,1)\}$ and $$F_n=X\cap ([0,1]\times [0,1-1/n]).$$
But what if the closed sets are all nowhere dense?
Question. If $X$ is a space, each $F_n$ is a closed nowhere dense totally disconnected subset of $X$, and $X=\bigcup_{n\in\omega} F_n$, then can $X$ be connected?
By the way, a connected space can be first category: Take the Cantor fan and delete all of the lines that extend from non-endpoints of the Cantor set. But here some of the closed sets would contain intervals.
I have example. It is like the Knaster-Kuratowski fan but a pyramid. Let $X$ be the KK fan. Take $Y:=ℚ×X$ and then combine all of the vertex points of the copies of $X$ into a super vertex $v$. So you get a connected space. The sets $$\{q\}×(X\cap ([0,1]×[0,1−1/n]))$$ for $q∈ℚ$ and $n≥1$ are closed nowhere totally disconnected dense subsets of $Y$. These sets, together with $\{v\}$ union to $Y$.