Consider the following: we have a square-free, positive, composite integer $d$ such that $-d\equiv 2\text{ or }3\bmod4$, $p$ is a prime divisor of $d$, and $K=\mathbb Q(\sqrt{-d})$.
My goal is to do the following:
Show that $K$ has no element of norm $\pm p$, hence or otherwise, by considering the prime factorisation of $\langle p \rangle$, prove that the class number of $K$ is even.
First of all, this is my attempt at showing that no element has norm $p$:
Suppose $\alpha=x+y\sqrt{-d}$ is an element of $K$, and write $d=cp$, $c\geqslant2$. Then equation $\operatorname{N}_{K/\mathbb Q}(\alpha)=\pm p$ has no solutions since otherwise $$x^2+p(cy^2\pm1)=0,$$ which is impossible unless $x=1$ and $y=0$ (in which case $x^2=\pm p$, also impossible), since $$|x^2+p(cy^2\pm1)|\geqslant |x^2+p(2y^2\pm1)| > 0,$$ where the inequality follows easily by considering cases of $x,y$ being equal to/different from zero separately.
(I'm not sure if this is the easiest way to go about this)
Next, applying Dedekind-Kummer, the minimal polynomial of $\sqrt{-d}$ over $\mathbb Z$ is $x^2+d^2=x^2+c^2p^2\equiv x^2\bmod p$. Thus $\langle p\rangle = \langle p, -d\rangle=\langle p \rangle$, and in particular, $\langle p \rangle$ is prime.
How does this help me show the class number is even?
Notice that $p$ ramifies, so you cannot apply Dedekind Kummer. But $p$ ramifying implies that $\langle p \rangle=\mathfrak p^2$ for some prime ideal $\mathfrak p$. This cannot be a principal ideal, because if it were, then its generator would have norm $p$. Therefore $\mathfrak p$ is an element of the class group having order 2.