Let $R$ be a ring and $f\in R[X]$ a polynomial with infinitely many zeros in $R$. You might think that $f$ is the zero polynomial, but that is not true if $R$ is not commutative, as this example of the quaternions shows.
What about if $R$ is commutative? I didn't find a counterexample online, but it's easy to give one, and I found this somewhat enlightening. Consider the field $\mathbb{F}_2=\{0,1\}$ with two elements. The polynomial $f=X^2-X\in\mathbb{F}_2[X]$ has two zeros, namely $0$ and $1$. Now consider the Ring $R=\mathbb{F}_2^{\mathbb{N}}=\{ \mathbb{N}\to\mathbb{F}_2\}$. We can think of elements of $R$ as sequences $(0,1,1,0,1,\ldots)$. Now clearly, any such sequence is also a zero of $f$. So $f$ actually vanishes

*everywhere*on $R$, which has infinite size, but $f$ is not the zero polynomial. The statement is of course true if $R$ is a commutative integral domain.