TITLE: Why do we only consider ideals with a prime norm when looking at ideals smaller than the Minkowski bound?
QUESTION [5 upvotes]: 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!

REPLY [3 votes]: You do not, you only consider prime ideals, which may or may not have prime norm. The reason we only consider the prime ideals is because the ideal group is generated by the primes (that's what unique factorization means!) so if all the generators are principal, any product of them is principal. So it is necessary and sufficient that all prime ideals be principal in order to show the ring is a PID.