Let $y \in Y_s$. We may always replace $Y$ by an open neighbourhood of $y$. Thus we may assume $Y$ and $S$ affine. We may also assume that $X$ is flat over $S$, $\dim(X_y) \leq 1$ for $y \in Y$, $R^1f_*\mathcal{O}_X = 0$ universally, and that $\mathcal{O}_Y \to f_*\mathcal{O}_X$ is surjective, see Lemma \ref{lemma-h1-fibre-zero-h0-kappa}. (We won't use all of this.) \medskip\noindent Assume $S$ and $Y$ affine. Write $S = \lim S_i$ as a cofiltered of affine Noetherian schemes $S_i$. By Limits, Lemma \ref{limits-lemma-descend-finite-presentation} there exists an element $0 \in I$ and a diagram $$ \xymatrix{ X_0 \ar[rr]_{f_0} \ar[rd] & & Y_0 \ar[ld] \\ & S_0 } $$ of finite type morphisms of schemes whose base change to $S$ is the diagram of the lemma. After increasing $0$ we may assume $Y_0$ is affine and $X_0 \to S_0$ proper, see Limits, Lemmas \ref{limits-lemma-eventually-proper} and \ref{limits-lemma-limit-affine}. Let $s_0 \in S_0$ be the image of $s$. As $Y_s$ is affine, we see that $R^1f_{s, *}\mathcal{O}_{X_s} = 0$ is equivalent to $H^1(X_s, \mathcal{O}_{X_s}) = 0$. Since $X_s$ is the base change of $X_{0, s_0}$ by the faithfully flat map $\kappa(s_0) \to \kappa(s)$ we see that $H^1(X_{0, s_0}, \mathcal{O}_{X_{0, s_0}}) = 0$ and hence $R^1f_{0, *}\mathcal{O}_{X_{0, s_0}} = 0$. Similarly, as $\mathcal{O}_{Y_s} \to f_{s, *}\mathcal{O}_{X_s}$ is an isomorphism, so is $\mathcal{O}_{Y_{0, s_0}} \to f_{0, *}\mathcal{O}_{X_{0, s_0}}$. Since the dimensions of the fibres of $X_s \to Y_s$ are at most $1$, the same is true for the morphism $X_{0, s_0} \to Y_{0, s_0}$. Finally, since $X \to S$ is flat, after increasing $0$ we may assume $X_0$ is flat over $S_0$, see Limits, Lemma \ref{limits-lemma-descend-flat-finite-presentation}. Thus it suffices to prove the lemma for $X_0 \to Y_0 \to S_0$ and the point $s_0$. \medskip\noindent Combining the reduction arguments above we reduce to the case where $S$ and $Y$ affine, $S$ Noetherian, the fibres of $f$ have dimension $\leq 1$, and $R^1f_*\mathcal{O}_X = 0$ universally. Let $y \in Y_s$ be a point. Claim: $$ \mathcal{O}_{Y, y} \longrightarrow (f_*\mathcal{O}_X)_y $$ is an isomorphism. The claim implies the lemma. Namely, since $f_*\mathcal{O}_X$ is coherent (Cohomology of Schemes, Proposition \ref{coherent-proposition-proper-pushforward-coherent}) the claim means we can replace $Y$ by an open neighbourhood of $y$ and obtain an isomorphism $\mathcal{O}_Y \to f_*\mathcal{O}_X$. Then we conclude that $Y$ is flat over $S$ by Lemma \ref{lemma-h1-fibre-zero-h0-flat}. Finally, the isomorphism $\mathcal{O}_Y \to f_*\mathcal{O}_X$ remains an isomorphism after any base change $S' \to S$ by the final statement of Lemma \ref{lemma-h1-fibre-zero-h0-flat}. \medskip\noindent Proof of the claim. We already know that $\mathcal{O}_{Y, y} \longrightarrow (f_*\mathcal{O}_X)_y$ is surjective (Lemma \ref{lemma-h1-fibre-zero-h0-kappa}) and that $(f_*\mathcal{O}_X)_y$ is $\mathcal{O}_{S, s}$-flat (Lemma \ref{lemma-h1-fibre-zero-h0-flat}) and that the induced map $$ \mathcal{O}_{Y_s, y} =  \mathcal{O}_{Y, y}/\mathfrak m_s\mathcal{O}_{Y, y} \longrightarrow (f_*\mathcal{O}_X)_y/\mathfrak m_s (f_*\mathcal{O}_X)_y \to (f_{s, *}\mathcal{O}_{X_s})_y $$ is injective by the assumption in the lemma. Then it follows from Algebra, Lemma \ref{algebra-lemma-mod-injective} that $\mathcal{O}_{Y, y} \longrightarrow (f_*\mathcal{O}_X)_y$ is injective as desired.