I was reading Lazarsfeld's Positivity in Algebraic Geometry, and I realize that Cartier divisor can have torsion elements, but I can't find such an example.
I know for the Noetherian scheme that is locally factorial, the Cartier divisor is isomorphic to Weil Divisor and we know Weil Divisor group is free therefore it's torsion-free. So this can only happen when the Weil Divisor do not isomorphic to Cartier divisor is there any example that the Cartier divisor has a torsion element.
Let $ U $ be the complement in $ \mathbb{P}^2 $ of a smooth curve $ C $ of degree $ d $. There is the standard exact sequence of Weil divisor groups / divisor class groups (just to be clear, I'm quotienting out by principal divisors, call it whatever you want to)
$$ \operatorname{Cl}(C) \rightarrow \operatorname{Cl}(\mathbb{P}^2) \rightarrow \operatorname{Cl}(U) \rightarrow 0 $$
It's well known that $ \operatorname{Cl}(\mathbb{P}^2) $ is $ \mathbb{Z} . H $ where $ H $ is the class of a hyperplane, and the image of the first map is obviously $ dH $ so $ \operatorname{Cl}(U) \cong \mathbb{Z} / d\mathbb{Z} $ is torsion whenever $ d > 1 $.
EDIT: I managed to confuse myself horribly, late at night. yi li's original question seems to be this - does $ \Gamma(X, K_X^{\times}/ \mathcal{O}_X^{\times} ) $ have torsion elements? If $ X $ is the cuspidal cubic defined by $ y^2 - x^3 $ and we consider the global section $ y/x \in \Gamma(X, K_X^{\times}/ \mathcal{O}_X^{\times} ) $ then $ (y/x)^3 = y \in \mathcal{O}_X^{\times} $ showing that torsion may exist. EDIT2: Of course, this is wrong. I'm going to leave it here for now and come back when I'm awake.