prove $(n)$ prime ideal of $\mathbb{Z}$ iff $n$ is prime or zero

Another way would be to show that $\mathbb{Z}$ is a principal ideal domain or that it has unique factorization. Don't you also need the definition that a prime ideal has to be properly contained within the whole ring?

If $n = \pm 1$, then $\langle n \rangle = \mathbb{Z}$ and thus it can't be a prime ideal. If $n$ is composite and divisible by some prime $p$, then $\langle n \rangle$ is properly contained within $\langle p \rangle$ and thus $\langle n \rangle$ is not a prime ideal either.

And then you just proceed with what you have already demonstrated.