I am trying to understand why the morphism of prestacks $\mathcal{M}_{g,1}\to\mathcal{M}_g$ is the "universal family". Here $\mathcal{M}_g$ is the moduli stack of curves of genus $g$, its objects are smooth maps of schemes $X\to S$ with all fibers projective curves of genus $g$ over some fixed field $k$ with the cartesian diagrams as morphisms, and in $\mathcal{M}_{g,1}$ we fix a section $S\to X$ and require that the diagrams commute.
It was given as an exercise in Jarod Alper's course on stack to show that for a scheme $S$ the fiber product of prestacks
$\require{AMScd}$ \begin{CD} S\times_\mathcal{M_g} \mathcal{M}_{g,1} @>{}>> \mathcal{M}_{g,1}\\ @VVV @VVV\\ S @>{\tau}>> \mathcal{M}_g \end{CD} is isomorphic to $G$ as a prestack, in which $G$ is the family in $\mathcal{M}_g$ corresponds to $\tau$ under the 2-Yoneda lemma.
And I am struggling a bit, all the 2-categorical stuff is very new to me. I can construct an object of $G$ as a prestack from an object of the fiber product, but not the other way around.
Let's start with a an element of product. It is a triple $(x,y,\gamma)$, where $x$ is a morphism of schemes $T\to S$, $y$ is a family with a section $Y\to T$, $\gamma$ is a cartesian diagram
$\require{AMScd}$ \begin{CD} T\times_\mathcal{S} G @>{}>> Y\\ @VVV @VVV\\ T @>{id}>> T \end{CD}
Then we may take $T\times_\mathcal{S}G$ as an object of $G$ as a prestack.
What I don't get is how to go the other way, it seems that choosing a different section of the family $y$ results in the same object. Maybe I misunderstood what $G$ is as a prestack here?
EDIT: I just realized that a fiber product of prestacks is only unique up to a 2-isomorphism, so maybe it's hopeless to have a bijection on objects. I tried to show this result using the universal property description, but I still run into a problem: I can't construct a reasonable map $G\to \mathcal{M_{g,1}}$.