Suppose $S$ is a $\mathbb{Z}_{\geq 0}$ graded ring that that $f\in S_+$ where $S_+$ is the irrelevant ideal. I know that we may associate $D_+(f)$ with the set of prime ideal of the zero degree component of S. That is, $D(f)=\operatorname{Spec}(S_f)_0$. Further, we define the set $\operatorname{Proj}S$ to be the set of homogeneous prime ideals that do not contain the irrelevant ideal $S_+$.
I am wondering why the following exercise (4.5.k) in Vakil's algebraic geometry notes implies what the structure of $\operatorname{Proj}S$ should be: "If $f,g\in S_+$ are homogeneous and nonzero, describe an isomorphism between $\operatorname{Spec}(S_{fg})_0$ and the distinguished open subset $D(g^{\deg f}/f^{\deg g})$ of $\operatorname{Spec}(S_f)_0$. Similarly, $\operatorname{Spec}(S_{fg})_0$ is identified with a distinguished open subset of $\operatorname{Spec}(S_g)_0$. We then glue the various $\operatorname{Spec}(S_f)_0$ (as $f$ varies) altogether, using these pairwise gluings.
The author then suggests that this exercise implies what the structure sheaf on $\operatorname{Proj}S$ should look like. If my intuition is correct, this is because using the identifications above, and the fact that the $D_+(f)$, where $f\in S_+$, form a base for the topology on $\operatorname{Proj}S$, we can use the identification above to glue $D(f)$ and $D(g)$ along $D(fg)$, and then use the structure sheaf for the gluing of affine scheme. Is this intuition correct?