$x^4 - 10x^2 + 1$ has the following three factorisations:
\begin{align*}
x^4 - 2x^2 + 1 - 8x^2 & = (x^2 - 1)^2 - 2(2x)^2 \\
x^4 + 2x^2 + 1 - 12x^2 & = (x^2 + 1)^2 - 3(2x)^2 \\
x^4 - 10x^2 + 25 - 24 & = (x^2 - 5)^2 - 6(2^2)
\end{align*}
If $2$ is a quadratic residue modulo $p$, then the first is a difference of two squares, hence reducible.
If $3$ is a quadratic residue modulo $p$, then the second is a difference of two squares.
If neither $2$ nor $3$ is a quadratic residue modulo $p$, then their product $6$ is a quadratic residue modulo $p$, and so the third is a difference of two squares. Hence in all three cases, the polynomial is reducible.