I was working on some examples on how to compute the class number of a quadratic number field: I do understand that for some quadratic number field $\mathbb{Q}(\sqrt{d})$, with $d\in \mathbb{Z}, d \neq \{0,1\}$ and squarefree, I need to compute the Minkowski bound and then look at ideals with norm smaller than the Minkowski bound, which then gives me the class number.
However, I was wondering why I only look at ideals with a prime number as the norm? One example was the number field $K:=\mathbb{Q}(\sqrt{-163})$ (which has class number $1$) where I computed that in every class of the class group, there exists some ideal $\mathfrak{A}$ with $N(\mathfrak{A}) < 8.1$. I could easily compute that there are no ideals with norm $2,3,5$ or $7$ as those are inert in $\mathcal{O}_K$.
Now I'm having some trouble to understand why I only need to look at those ideals and ignore those with norm $4,6$ or $8$ (as was done in the example). I assume that there's maybe some argument working with the factorization of ideals into prime ideals (which works in $\mathcal{O}_K$ as a Dedekind domain). I also looked up other questions on this topic but did unfortunately not find a definite answer.
Thank you for your help and explanations!