By Morphisms, Lemma \ref{morphisms-lemma-openness-bounded-dimension-fibres} and the fact that $f$ is closed, we can find an affine open neighbourhood $V$ of $y$ such that the fibres over points of $V$ all have dimension $\leq d$. Thus we may assume $X \to Y$ is a proper morphism all of whose fibres have dimension $\leq d$ with $Y$ affine. We will show that (2) holds, which will immediately imply (1) for all $y \in Y$. \medskip\noindent By Lemma \ref{lemma-proper-limit-of-proper-finite-presentation} we can write $X = \lim X_i$ as a cofiltered limit with $X_i \to Y$ proper and of finite presentation and such that both $X \to X_i$ and transition morphisms are closed immersions. For some $i$ we have that $X_i \to Y$ has fibres of dimension $\leq d$, see Lemma \ref{lemma-limit-dimension}. For a quasi-coherent $\mathcal{O}_X$-module $\mathcal{F}$ we have $R^pf_*\mathcal{F} = R^pf_{i, *}(X \to X_i)_*\mathcal{F}$ by Cohomology of Schemes, Lemma \ref{coherent-lemma-relative-affine-vanishing} and Leray (Cohomology, Lemma \ref{cohomology-lemma-relative-Leray}). Thus we may replace $X$ by $X_i$ and reduce to the case discussed in the next paragraph. \medskip\noindent Assume $Y$ is affine and $f : X \to Y$ is proper and of finite presentation and all fibres have dimension $\leq d$. It suffices to show that $H^p(X, \mathcal{F}) = 0$ for $p > d$. Namely, by Cohomology of Schemes, Lemma \ref{coherent-lemma-quasi-coherence-higher-direct-images-application} we have $H^p(X, \mathcal{F}) = H^0(Y, R^pf_*\mathcal{F})$. On the other hand, $R^pf_*\mathcal{F}$ is quasi-coherent on $Y$ by Cohomology of Schemes, Lemma \ref{coherent-lemma-quasi-coherence-higher-direct-images}, hence vanishing of global sections implies vanishing. Write $Y = \lim_{i \in I} Y_i$ as a cofiltered limit of affine schemes with $Y_i$ the spectrum of a Noetherian ring (for example a finite type $\mathbf{Z}$-algebra). We can choose an element $0 \in I$ and a finite type morphism $X_0 \to Y_0$ such that $X \cong Y \times_{Y_0} X_0$, see Lemma \ref{lemma-descend-finite-presentation}. After increasing $0$ we may assume $X_0 \to Y_0$ is proper (Lemma \ref{lemma-eventually-proper}) and that the fibres of $X_0 \to Y_0$ have dimension $\leq d$ (Lemma \ref{lemma-limit-dimension}). Since $X \to X_0$ is affine, we find that $H^p(X, \mathcal{F}) = H^p(X_0, (X \to X_0)_*\mathcal{F})$ by Cohomology of Schemes, Lemma \ref{coherent-lemma-relative-affine-cohomology}. This reduces us to the case discussed in the next paragraph. \medskip\noindent Assume $Y$ is affine Noetherian and $f : X \to Y$ is proper and all fibres have dimension $\leq d$. In this case we can write $\mathcal{F} = \colim \mathcal{F}_i$ as a filtered colimit of coherent $\mathcal{O}_X$-modules, see Properties, Lemma \ref{properties-lemma-directed-colimit-finite-presentation}. Then $H^p(X, \mathcal{F}) = \colim H^p(X, \mathcal{F}_i)$ by Cohomology, Lemma \ref{cohomology-lemma-quasi-separated-cohomology-colimit}. Thus we may assume $\mathcal{F}$ is coherent. In this case we see that $(R^pf_*\mathcal{F})_y = 0$ for all $y \in Y$ by Cohomology of Schemes, Lemma \ref{coherent-lemma-higher-direct-images-zero-above-dimension-fibre}. Thus $R^pf_*\mathcal{F} = 0$ and therefore $H^p(X, \mathcal{F}) = 0$ (see above) and we win.