We start with an invertible sheaf $\mathcal{L}$ and an open cover $\mathcal{U}=\{U_i\}_i$ for $X$, such that $\mathcal{L}|_{U_i}=O_X|_{U_i}$. So the line bundle is given by the information :
Iso$(O_X|_{U_i\cap U_j},O_X|_{U_i\cap U_j})=\Gamma(U_i\cap U_j,O_X^*)$, where each isomorphism $\phi_{ij}$ is given by multiplication by $s_{ij}\in\Gamma(U_i\cap U_j,O_X^*)$. Now, these $(s_{ij})$-s satisfy the cocycle condition (because of the conditions for glueing of sheaves), and hence gives an element of $H^1(\mathcal{U},X)$.
How do we prove that this is a well defined map? I first tried this. If $\mathcal{L}$ is isomorphic to $\mathcal{L'}$ with trivialization on the same open cover. And if $\mathcal{L'}$ gives rise to and element $(s'_{ij})$ of $H^1(\mathcal{U},X)$. Then we need them to differ by an element of $Im(d^0)$, i.e., $(s_{ij}s'_{ij})=(g_j^{-1}g_i)$ where $g_i\in O_X^*(U_i)$. But I am not getting this when I try to work out.
I will be very grateful if someone provides the details. Thanks in advance!