[guided]The goal is to turn the heat equation into a scalar inequality for the size of the solution. We measure the size of the zero-mean part $w$ by the squared $L^2$ energy
\begin{align*}
E(t)=\|w(\cdot,t)\|_{L^2(U)}^2=\int_U |w(x,t)|^2 \, d\mathcal{L}^n(x).
\end{align*}
For $t>0$, analyticity of the Neumann heat semigroup gives $w(t)\in D(\Delta_N)$ and $\partial_t w(t)=\Delta_N w(t)=\Delta w(t)$ in $L^2(U)$, so differentiating the $L^2$ norm is justified. This gives
\begin{align*}
E'(t)=2\int_U w(x,t)\partial_t w(x,t) \, d\mathcal{L}^n(x).
\end{align*}
Substituting the heat equation $\partial_t w=\Delta w$ gives
\begin{align*}
E'(t)=2\int_U w(x,t)\Delta w(x,t) \, d\mathcal{L}^n(x).
\end{align*}
Now the Neumann boundary condition is used exactly through the weak Neumann Green identity. For functions in $D(\Delta_N)$, this identity says
\begin{align*}
\int_U v(x)\Delta v(x) \, d\mathcal{L}^n(x)=-\int_U |\nabla v(x)|^2 \, d\mathcal{L}^n(x).
\end{align*}
Applying it with $v=w(\cdot,t)$ gives
\begin{align*}
E'(t)=-2\int_U |\nabla w(x,t)|^2 \, d\mathcal{L}^n(x).
\end{align*}
This identity says that the heat equation dissipates $L^2$ energy at a rate equal to twice the Dirichlet energy. To convert this dissipation into decay of $E(t)$ itself, we use the zero-mean condition. Since
\begin{align*}
\int_U w(x,t) \, d\mathcal{L}^n(x)=0,
\end{align*}
connectedness implies that the zero eigenspace of the Neumann Laplacian is exactly the constants. Since $w(\cdot,t)$ has zero mean, it is orthogonal in $L^2(U)$ to that eigenspace. Therefore the variational characterization of the first positive Neumann eigenvalue applies to $w(\cdot,t)$; equivalently, the Neumann Poincare inequality on zero-mean functions assumed in the theorem statement yields
\begin{align*}
\int_U |\nabla w(x,t)|^2 \, d\mathcal{L}^n(x) \geq \lambda_{1,N} \int_U |w(x,t)|^2 \, d\mathcal{L}^n(x).
\end{align*}
Combining the previous two displays gives
\begin{align*}
E'(t)\leq -2\lambda_{1,N} E(t).
\end{align*}
This is the point where connectedness and the zero-mean condition enter: they ensure that the first nonzero Neumann eigenvalue controls the entire zero-mean component.[/guided]