How does (21) factor into prime ideals in the ring $\mathbb{Z}[\sqrt{-5}]$?

Note that $(21)=(3)(7)$, so that it suffices to factorize $(3)$ and $(7)$. This is easier because $3$ and $7$ are primes in $\mathbb Z$.

Is $(3)$ a prime ideal ? Inspection reveals it is not : if $z_1=1-\sqrt{-5}$ and $z_2=1+\sqrt{-5}$ are both not in $(3)$ but $z_1z_2=6$ is. Straightforward computations show that $(3)=(3,z_1)(3,z_2)$. Note that $(3,z_1)$ and $(3,z_2)$ are the same thing as $\lbrace x+y\sqrt{-5} \ | \ x,y\in{\mathbb Z}, y\equiv -x\ ({\sf mod} \ 3) \rbrace$ and $\lbrace x+y\sqrt{-5} \ | \ x,y\in{\mathbb Z}, y\equiv x\ ({\sf mod} \ 3) \rbrace$ respectively, and those two ideals are easily seen to be prime.

Similarly, one obtains the factorization $(7)=(7,3-\sqrt{-5})(7,3+\sqrt{-5})$. In the end, the complete Dedekind factorization of $(21)$ is

$$ (21)=(3,1-\sqrt{-5})(3,1+\sqrt{-5})(7,3-\sqrt{-5})(7,3+\sqrt{-5}) \tag{1} $$

Call those factors $J_1,J_2,J_3,J_4$ in that order. For an ideal $J$, denote its ideal class by $c(J)$ and let $c_i=c(J_i)$. Straightforward computations show that $J_1^2=(2+\sqrt{-5})$, $J_3^2=(-2+3\sqrt{-5})$, $J_1J_3=(1+2\sqrt{-5})$, so $c_1=c_2=c_3=c_4$ and the subgroup generated by the $c_i$ is a two-element group.

One can also show that the whole class group consists only of two elements, but that’s a little harder.