Example 2 Given a positive number $p$ and a parabola $C: y^{2}=2 p x$ $(p>0)$, $A\left(\frac{p}{6}, 0\right)$ is a point on the axis of symmetry of the parabola $C$, and $O$ is the vertex of the parabola $C$. $M$ is any point on the parabola $C$. Find the maximum value of $\frac{|O M|}{|A M|}$. ${ }^{[2]}$
(2013, Xin Zhi Cup Shanghai High School Mathematics Competition)
Let $M(x, y)$. Then
$$
\begin{array}{l}
x \geqslant 0, \text { and } y^{2}=2 p x(p>0). \\
\text { Hence }\left(\frac{|O M|}{|A M|}\right)^{2}=\frac{x^{2}+y^{2}}{\left(x-\frac{p}{6}\right)^{2}+y^{2}} \\
=\frac{x^{2}+2 p x}{x^{2}-\frac{p x}{3}+\frac{p^{2}}{36}+2 p x}=\frac{x^{2}+2 p x}{x^{2}+\frac{5 p x}{3}+\frac{p^{2}}{36}}.
\end{array}
$$

Let $f(x)=\frac{x^{2}+2 p x}{x^{2}+\frac{5 p x}{3}+\frac{p^{2}}{36}}$
$$
=1+\frac{4 p}{(12 x-p)+\frac{25 p^{2}}{12 x-p}+22 p}(x \geqslant 0).
$$
(1) When $12 x-p>0$,
$$
\begin{array}{l}
1<f(x) \\
\leqslant 1+\frac{4 p}{2 \sqrt{(12 x-p) \frac{25 p^{2}}{12 x-p}}+22 p}=\frac{9}{8}. \\
\end{array}
$$

The equality holds if and only if $12 x-p=5 p$, i.e., $x=\frac{p}{2}$.
(2) When $12 x-p=0$, $f(x)=1$.
(3) When $12 x-p<0$,
$$
f(x) \geqslant 1+\frac{4 p}{-26 p+22 p}=0.
$$

In summary, $0 \leqslant f(x) \leqslant \frac{9}{8}$.
Therefore, when $x=\frac{p}{2}$, the maximum value of $\frac{|O M|}{|A M|}$ is $\frac{3 \sqrt{2}}{4}$.