This is a question related to Neukirch 'Algebraic number theory',
$p 71$, $Prop 11.6$ (https://web.math.ucsb.edu/~agboola/teaching/2021/fall/225A/neukirch.pdf).
Let $o$ be a Dedekind domain and let $o(X)=\{\frac{f}{g}\mid f,g \in o, g \not\equiv 0 \pmod p, \forall p \in X\}$.
Neukirhi's 'Algebraic number theory', prop 11.6 reads there is a surjection $Cl(O) \to Cl(O(X))$.
The proof foes as follows.
The map $Cl(O) \to Cl(O(X))$ is defined as $a \to aO(X)$ and class of prime ideal $p\in X$ goes to class of prime ideal of $O(X)$.
This class generates $Cl(O(X))$, thus surjection.
My question is, why $Cl(O(X))$ is generated by the image of the prime ideal $p$ of $X$ ?