Let $K$ be a number field and let $S$ be a finite set of places of $K$ containing the archimedean ones. Then we can define:
$$\mathcal O_S:=\{a\in K\colon a\in\mathcal O_{\mathfrak p},\;\forall\mathfrak p\notin S\}\supset \mathcal O_K$$
We know that $\mathcal O_S$ is a Dedekind domain and that $\mathcal O_S$ is the localization of $\mathcal O_K$ at the multiplicative set $$T=\left( \prod_{\mathfrak q\in S\setminus S_{\infty}}\mathfrak q\right)\setminus \{0\}$$
Moreover the prime ideals of $\mathcal O_S$ are of the type $\mathfrak p\mathcal O_S$ with $\mathfrak p\notin S$.
It is easy to see that $\operatorname{Cl}(\mathcal O_S)\subseteq \operatorname{Cl}(\mathcal O_K)$ so if we enlarge $S$ to a set of places $S'$ we get $\mathcal O_S\subset\mathcal O_{S'}$ and
$$\operatorname{Cl}(\mathcal O_{S'})\subseteq \operatorname{Cl}(\mathcal O_S)\subseteq \operatorname{Cl}(\mathcal O_K)$$
Why we can always find a set $S'$ such that $\operatorname{Cl}(\mathcal O_{S'})=1$? Since the class number $h_k$ of $K$ is finite, it is clear that $\operatorname{Cl}(\mathcal O_{S'})$ divides $h_k$, but why can we eventually reach $1$?
What one does, it to write down a finite set of ideals $I_1,\ldots,I_k$ whose classes $[I_1],\ldots,[I_k]$ generate the class-group. Let $S'$ contain all the prime ideal factors of all the $I_j$. Then $\mathcal{O}_{S'}$ will have trivial class-group.