Is the class number of $K$ the number of factorizations an element of $\mathcal{O}_K$ can have?

If the class group is not 1 then there are infinitely many non-principal prime ideals, from which we get a sequence of distinct prime ideals $P_j$ all equivalent in the class group. Let $n$ be the order of $P_1$, then for all $m$ and $l\in n\ldots nm$, $$\underbrace{\prod_{j=1}^{mn} P_j}_{(a_m)} = \underbrace{(P_l \prod_{j=1}^{n-1} P_j)}_{(b_{m,l})}\underbrace{(\prod_{j=n,j\ne l}^{nm} P_j)}_{(c_{m,l})}$$ Then $b_{m,l}$ is irreducible and it doesn't divide any of the $c_{m,i}$, so you get at least $n(m-1)+1$ factorizations of $a_m$.


For class number 2 there is an interpretation, found by Carlitz (A characterization of algebraic number fields with class number two, Proc. Amer. Math. Soc. 11 (1960), 391-392) here: a number field $K$ has class number 2 if and only if (i) $\mathcal O_K$ is not a UFD and (ii) all irreducible factorizations of an element have the same number of irreducible factors. For example, since $\mathbf Q(\sqrt{-5})$ has class number 2, all irreducible factorizations of 6 will involve 2 factors because you found one such factorization with 2 factors (don't confuse the two roles of 2 there, which is what led to your question). But $\mathbf Q(\sqrt{-14})$ has class number 4, which is bigger than 2, and that means some element will have two irreducible factorizations with different numbers of factors. For instance, $$ 81 = 3 \cdot 3 \cdot 3 \cdot 3 \cdot 3 = (5+2\sqrt{-14})(5-2\sqrt{-14}) $$ show us irreducible factorizations of 81 with 4 and 2 irreducible factors.

A characterization of number fields with a specific ideal class group $G$ was given in 1983 by Rush (An arithmetic characterization of algebraic number fields with a given class group, Math. Proc. Cambr. Phil. Soc. 94 (1983), 23-28). See here. It is not as simple as the description Carlitz gave for class number 2.