If $(X,\tau)$ has no open connected set, must $(X,\tau)$ be totally disconnected?

Let $(X,\tau)$ a topological space and suppose that for all open sets $U \in \tau$ we have that $U$ is disconnected. Can we conclude that $(X,\tau)$ is totally disconnected, i.e. its connected components are singletons? I'm mostly interested in the case where $X$ is second countable completely metrizable.

Not in general. Consider $A=\{w\in\Bbb{C} : |w| \in \Bbb{Q}\}\subset \Bbb{C}$. Any open subset of $A$ is disconnected, but the connected components are circles with rational radius.
Alternatively for a complete space, require $|w|$ is in the cantor set. Since the cantor set is closed, then this will be a complete metric space with the property you are interested in.
Let $$X=\big(\{0\}\times \mathbb R\big) \cup \bigcup _{n\in\mathbb N} \big(\{1/n\}\times \mathbb P\big) ,$$ where $\mathbb P$ is the set of irrationals. Then $X$ is separable completely metrizable, has no connected open subset, but is not totally disconnected.
The components of $[0, 1] × 2^ω$ are the copies of interval and they are nowhere dense. The space is even compact metrizable.