Obviously if I write all the possible ones and try the roots I'd get a LOT of polynomials $(125)$ and I'd have to test $5$ roots for each of them, which would be a LOT. Is there any idea?
I must also do it for degree $\le 3$ over $\mathbb{Z}_3$
Do you guys have any ideas to make it easier?
please remember that I'm on a ring theory course
Let $ax^2 + bx + c$ be a polynomial of degree $2$ over $\mathbb Z_5$. Then $a \neq 0$, so we can multiply by $a^{-1}$ to get $x^2 + Bx + C$. There are $5$ choices for $B$ and $C$, so there are only $25$ polynomials of this form.
On the other hand, a reducible monic polynomial will be of the form $(x - \alpha)(x - \beta)$, and there are ${5 \choose 2} + 5 = 15$ such polynomials. If you list these, there will be $25-15=10$ that are not listed, and these will be irreducible. (And then for any irreducible polynomial, you can multiply it by a nonzero constant to get another.)