Given two sheaves $\mathscr F,\mathscr G$ over a top. space $X$, consider an open covering $X=\cup_{\lambda\in L} U_\lambda$, then if $\mathscr F|_{U_\lambda}=\mathscr G|_{U_\lambda}$ for all $\lambda\in L$, we have that $\mathscr F=\mathscr G$.
I know this isn't true if we consider $\mathscr F(U_\lambda)$ and $\mathscr G(U_\lambda)$ instead, there are many counterexamples, even on this website itself.
But I haven't seen the case with the restriction. I think this is what's talked about on section 3.3.2 of EGA 0 (https://fppf.site/ega/ega0-auto.pdf here's an English version of the text), but I don't understand Grothendieck's proof (if he's proving what I'm asking, of course).
Is he saying that, because the diagram is commutative, we've got a bijection $u_\lambda:\mathscr F_\lambda\cong\mathscr G_\lambda$ and we can take the collection of $(u_\lambda)$ to be $u:\mathscr F\cong\mathscr G$
I also thought about taking a section $s$ over $\mathscr F(U)$, then a covering of each $U$ by $V_i$, that'd give us some section $t|_{V_i}$ that we can move to $\mathscr G(U)$ and paste them there, obtaining some section $s'$, and doing the same but swapping $\mathscr F$ and $\mathscr G$ would give us an isomorphism.
Cheers!
This was going to be a comment but it becomes to long.
If you have an equality $\mathscr{F}|_{U_\lambda}=\mathscr{G}|_{U_\lambda}$ for each $\lambda$ then you have $\mathscr{F}=\mathscr{G}$. Indeed, given an open set $V$ and $s \in\mathscr{F}(V)$ you have $$s_\lambda:=s|_{V\cap {U_\lambda}}\in \mathscr{F}(V\cap U_\lambda)=\mathscr{G}(V\cap U_\lambda)$$ for all $\lambda$ and this $s_\lambda$ are compatible together as sections of $\mathscr{G}$ hence you can glue them together to a section $s'\in \mathscr{G}(V)$. Then the map $s\mapsto s'$ gives you the isomorphism.
What is not true is that $\mathscr{F}|_{U_\lambda}\cong\mathscr{G}|_{U_\lambda}$ for each $\lambda$ implies $\mathscr{F}\cong\mathscr{G}$ and the reason way this is not a contradiction with the above is because this isomorphisms for different lambda may not induce the same isomorphisms in the intersections $\mathscr{F}|_{U_\lambda\cap U_\delta}\cong\mathscr{G}|_{U_\lambda\cap U_\delta}$. Hence, in the proof above we may not have that the image of $s_\lambda$ in $\mathscr{G}(V\cap U_\lambda)$ are compatible between them over $V\cap U_\lambda\cap U_\delta$. As two set that are equal always have only one equality map between them, the isomorphisms given by equalities are trivially compatible.
The compatibility issue of the isomorphisms is the only obstruction to get the global isomorphisms though and this is what is written in the chapter of EGA as KReiser explained.