For $\mathcal{O}_{K}$, the integer ring of a global field, we denote $S$ to be any set of primes of a global field $K.$ Let $$\mathcal{O}_{K,S}:=\{x\in K\mid v_{\mathfrak{p}}\geq 0\text{ for }\mathfrak{p}\notin S\}$$ be the ring of $S$-integers of $K$ (see Neukirch, Schmidt, Wingberg Cohomology of Number Fields, Ch. VIII, § 3).
Ideal class group of $\mathcal{O}_{K,S}$ is called $S$-ideal class group.
Neukirch, Schmidt, Wingberg, Cohomology of Number Fields, Ch. VIII, § 3, p.$452$ states that
$S$-ideal class group is the quotient of the usual ideal class group $Cl_K$ of $K$ by the subgroup generated by the classes of all prime ideals in $S$.
without no more explanation. How can I prove this statement?
My try and thought:
Let $X=\operatorname{Spec}(\mathcal{O}_{K})$, $X_S=\operatorname{Spec}(\mathcal{O}_{K,S})$. Natural map $X_S→X$ induces natural surjective map $f:\operatorname{Pic}(X)→\operatorname{Pic}(X_S)$.Thus, $\operatorname{Pic}X/\ker f$ is isomorphic to $\operatorname{Pic}(X_S)$ (Hartshone, Proposition $Ⅱ6.5$). So, I need to prove $\ker f$ is generated by the classes of all prime ideals in $S$. This is algebraic geometrical point of view, I want to accomplish this kind of proof, but another algebraic number theoretical approach is also appreciated.