Let's start with the couple of definitions:
Let's $R$ be an integral domain:
(1): Let $a,b \in R$. We say that a divides b or $a \mid b$, if there exists $c \in R$, such that: $b = ac$.
(2): An element $p \in R$ is called a prime element, if the following implication holds:
$p \mid ab \implies p \mid a$ or $p \mid b$.
Let $R$ be an unique factorization domain:
(3): Polynomial $f \in R[x]$ is called primitive if all coefficients of f are coprime.
(4): Eisenstein's criterion: Let's $R$ be an integral domain and $f = \sum_{i=0}^{n} a_ix^i$ be a primitive polynomial from $R[x]$. If there exists prime element $p \in R$, such that $p \mid a_0$, $p \mid a_1$, $\ldots$, $p \mid a_{n-1}$ and $p^2 \nmid a_0$, then polynomial f is irreducible in $R[x]$.
We know that all polynomials in the form: $(x^n - 2)$, $n \in \mathbb{N}$ are irreducible in $\mathbb{Q}[x]$.
$\mathbb{Q}$ is unique factorization domain/integral domain and therefore we can apply Eisenstein's criterion.
Let's choose for example: $(x^2 - 2)$. I've seen examples of choosing prime element $p = 2$, saying that $p \mid 2$ but $p^2 \mid 2$, therefore $(x^2 - 2)$ is irreducible in $\mathbb{Q}[x]$ via Eisenstein's criterion.
However, we can write $p^2 = 4 = 2.2$, $2 \in \mathbb{Q}$, therefore $p^2 \mid 2$, so $p = 2$ cannot be used to check irreducibility in this case.
I would like to understand where I am making a mistake.
Thanks.