We consider a normal irreducible variety $X$ and a line bundle $L$. The question is when $L$ is induced by a Cartier divisor $D$. We know that if $s$ is a rational section of $O_X(D)$, where $D$ is a Cartier divisor of $X$, then $(s)\sim D$, so the idea is to build a rational section $s$ of the line bundle $L$. In that case the divisor $D:=(s)$ will induce the line bundle $O_X(D)\cong L$. Thus the problem is equivalent to prove the existence of a rational section of the line bundle $L$.
In a coomology point of view, considering the short exact sequence
$0\to O_X^\times\to M^\times_X\to M^\times_X/O^\times_X\to 0$
we get the long exact sequence
$0\to H^0(X,O_X^\times)\to H^0(X,M_X^\times)\to H^0(X,M^\times_X/O_X^\times)\to^\alpha H^1(X,O_X^\times)\to H^1(X,M_X^\times)\to H^1(X,M_X^\times/O_X^\times)\to\cdots$
It is clear that $PDiv(X)=H^0(X,M_X^\times)$, $CDiv(X)=H^0(X,M_X^\times/O_X^\times)$ and $Pic(X)=H^1(X,O_X^\times) $ corresponds to the group of the line bundles on $X$. Moreover the connection morphism $\alpha$ corresponds exactly to the map associating to each Cartier divisor, its line bundle, in the usual sense. Our statement corresponds to require the morphism $\beta: H^1(X,O_X^\times)\to H^1(X,M_X^\times)$ is trivial. In fact we would have $\alpha$ surjective and so
$Pic(X)\cong CDiv(X)/PDiv(X)$
What does it mean $\beta$ trivial?
That for each line bundle $L=\{(\underline{U}, g_{ji})\}$, $\beta(L)=0$ in $H^1(X,M_X^\times)=\ker(\delta_1)/\Im(\delta_0)$, i.e. there exists some $s\in C^0(\underline{U},M_X^\times)$ such that
$g_{ji}=\delta_0(s)_{ji}=\frac{s_j}{s_i}$ in $U_i\cap U_j$
In other words $s\in C^0(\underline{U},M_X^\times)$ is the rational section that induces the line bundle $L$. Is it correct this reasoning?
In the Griffiths-Harris book, Principle of Algebraic geometry, it is proved the existence of a rational section in the case in which $X$ is an irreducible projective variety:
Let $H$ be an ample divisor of $X$. By Serre-Grothendieck theorem we know $L\otimes O_X(mH)$ is g.g. for $m$ sufficiently large, i.e there exists a global regular section $t\in H^0(X, L\otimes O_X(mH))$. But $H$ is ample, so there exists a global regular section $v$ of $O_X(H)$. Thus $\frac{t}{v^m}$ will be the rational section of $L$.
However I think there is in general (not only for a projective variety) a simple way to build it:
If $\psi_i: \pi^{-1}(U_i)\to U_i\times \mathbb{C}$ is a local trivialization of the line bundle $L$, then one can define the rational section
$s_i: U_i\to \pi^{-1}(U_i)\subseteq L$, $s_i(p):=\psi_i^{-1}(p,1)$
What am I missing? It is not possible it is so simple to build a rational section in general.