Example 4 Find all prime numbers $p$ such that $p^{3}-4 p+9$ is a perfect square.

Find all prime numbers $p$ such that $p^{3}-4 p+9$ is a perfect square.
Let $p^{3}-4 p+9=x^{2}, x$ be a non-negative integer, then $p \mid x^{2}-9$, i.e., $p \mid (x-3)(x+3)$. Combining with $p$ being a prime, we can set $x=k p \pm 3, k$ as a non-negative integer. Thus,
$$p^{3}-4 p=x^{2}-9=k^{2} p^{2} \pm 6 k p$$

We get $p^{2}-4=k^{2} p \pm 6 k$, which indicates: $p \mid 6 k \pm 4$.
When $p>2$, $p$ is an odd prime, it can be known that $p \mid 3 k \pm 2$, so $p \leqslant 3 k+2$, which indicates: $\frac{1}{3}\left(p^{2}-2 p-9\right) \leqslant p k-3 \leqslant x$

If $x \leqslant \frac{p^{2}}{4}$, then $\frac{1}{3}\left(p^{2}-2 p-9\right) \leqslant \frac{p^{2}}{4}$, we get $p \leqslant 8+\frac{36}{p}$, which means $p \leqslant 11$; if $x>\frac{p^{2}}{4}$, then $p^{3}-4 p+9=x^{2}>\frac{p^{4}}{16}$, we get $p<16-\frac{16(4 p-9)}{p^{3}}$, which means $p \leqslant 13$.

In summary, $p \leqslant 13$, direct enumeration yields $(p, x)=(2,3),(7,18),(11,36)$. Therefore, $p=2,7$ or 11.