Let $K$ be a number field and $D = \mathcal{O}_K$ its ring of integers. Let $I$ be a non-zero integral ideal of $D$ and suppose that the norm $N(I)$ is a (rational) prime. I want to prove that $I$ is a prime ideal in $D$.
Since $D$ is a Dedekind domain, $I$ has a unique factorisation into prime ideals, so write $I = \mathfrak{p}_1\cdots\mathfrak{p}_n$. Then, since the norm is completely multiplicative, we have
$$N(I) = N(\mathfrak{p}_1)\cdots N(\mathfrak{p}_n) = p$$
from some prime $p \in \Bbb Z$. In particular, this means that $p \mid N(\mathfrak{p}_i)$ for some $i \in \lbrace 1, \dots, n\rbrace$, and the product of the remaining norms is equal to $1$.
Does this mean that $N(I) = N(\mathfrak{p}_i)$ for some $i$ and hence that $I = \mathfrak{p}_i$?
Note that the norm of any proper ideal is never $1$. Thus $N(I) = N(\mathfrak{p}_1)\cdots N(\mathfrak{p}_n) = p$ implies in particular that $n=1$, so $I=\mathfrak{p_1}$.
You write "$N(I) = N(\mathfrak{p}_i)$, [...] hence $I=\mathfrak{p}_i$". The fact alone that two ideals have the same norm does not necessarily imply that they are equal. If one ideal divides the other ideal (as in this case), it does.
Alternatively, $N(I) = |D/I|$, so $D/I$ is a finite ring of order $p$. The only such ring is $\Bbb Z/(p)$, thus $D/I$ is an integral domain.