Example 6 Given that $f(x)$ is an $n(n>0)$ degree polynomial of $x$, and for any real number $x$, it satisfies:
$$
8 f\left(x^{3}\right)-x^{6} f(2 x)-2 f\left(x^{2}\right)+12=0
$$

Find $f(x)$
Let the highest degree term of $f(x)$ be $a_{n} x^{n}\left(a_{n} \neq 0\right)$, then the highest degree terms of $8 f\left(x^{3}\right), x^{6} f(2 x), 2 f\left(x^{2}\right)$ are $8 a_{n} \cdot x^{3 n}, 2^{n} a_{n} x^{n \cdot 6}, 2 a_{n} x^{2 n}$, respectively. Since $2 n<3 n$, by (1) and the Polynomial Identity Theorem, we have $\left\{\begin{array}{l}3 n=n+6 \\ 8 a_{n}-2^{n} a_{n}=0\end{array}\right.$
Solving, we get $n=3$
Thus, we can set $f(x)=a_{3} x^{3}+a_{2} x^{2}+a_{1} x+a_{0}$. In (1), let $x=0, a_{0}=-2$
Substituting $f(x)=a_{3} x^{3}+a_{2} x^{2}+a_{1} x-2$ into (1) and simplifying, we get
$$
-4 a_{2} x^{8}-2 a_{3} x^{7}+\left(8 a_{2}+2-2 a_{1}\right) x^{6}-2 a_{2} x^{4}+8 a_{1} x^{3}-2 a_{1} x^{2}=0 .
$$

By the Polynomial Identity Theorem, $a_{3}=1, a_{2}=a_{1}=0$
Therefore, the required polynomial is $f(x)=x^{3}-2$