[guided]Fix a coordinate $m \in \mathbb{N}$. To prove that $d_G(m)$ is defined, we need to force the generic filter to contain some condition whose finite stem includes coordinate $m$. Under the standard convention, a stem of length $L$ has domain $\{0,1,\dots,L-1\}$, so coordinate $m$ is included exactly when $L > m$. This is why we introduce the set
\begin{align*}
D_m := \{(s,h) \in \mathbb{D} : \operatorname{lh}(s) > m\}.
\end{align*}
The set $D_m$ belongs to the ground model $V$, because it is defined from the forcing notion $\mathbb{D}$ and the integer $m$. We verify that it is dense. Let $(s,h) \in \mathbb{D}$ be arbitrary. If the stem $s$ already has length greater than $m$, then $(s,h)$ itself lies in $D_m$.
Suppose instead that $\operatorname{lh}(s) \leq m$. We extend the stem to length $m+1$, because length $m+1$ is the first length that guarantees coordinate $m$ is in the domain. Define $t \in \mathbb{N}^{<\mathbb{N}}$ so that $t$ agrees with $s$ on the domain of $s$, has length $m+1$, and assigns
\begin{align*}
t(n) := h(n)
\end{align*}
for each newly added coordinate $n$ with $\operatorname{lh}(s) \leq n \leq m$. These are exactly the coordinates added when passing from domain $\{0,1,\dots,\operatorname{lh}(s)-1\}$ to domain $\{0,1,\dots,m\}$. Then $t$ extends $s$. The condition $(t,h)$ keeps the same bounding function, so the inequality between bounding functions required by the order is automatic. For every new coordinate, the Hechler order requires $t(n) \geq h(n)$, and this holds because $t(n) = h(n)$. Therefore $(t,h) \leq (s,h)$, and $\operatorname{lh}(t) = m+1 > m$, so $(t,h) \in D_m$.
Thus every condition has a stronger condition in $D_m$, meaning $D_m$ is dense. By definition, $G$ is $V$-generic precisely means that $G$ meets every [dense subset](/page/Dense%20Subset) of $\mathbb{D}$ that belongs to $V$. Therefore $G \cap D_m \neq \varnothing$. Hence some condition in $G$ has a stem whose domain contains coordinate $m$. Because the stems in $G$ are mutually compatible, all such stems give the same value at coordinate $m$. Since $m$ was arbitrary, $d_G$ is a total function $\mathbb{N} \to \mathbb{N}$.[/guided]