In this example we are multiplying two binomials so FOIL method can be used.
$$ \begin{aligned} \left( \color{blue}{ x^2-8}\right) \cdot \left( \color{orangered}{ x^4+2}\right) &= \underbrace{ \color{blue}{x^2} \cdot \color{orangered}{x^4} }_{\text{FIRST}} + \underbrace{ \color{blue}{x^2} \cdot \color{orangered}{2} }_{\text{OUTER}} + \underbrace{ \left( \color{blue}{-8} \right) \cdot \color{orangered}{x^4} }_{\text{INNER}} + \underbrace{ \left( \color{blue}{-8} \right) \cdot \color{orangered}{2} }_{\text{LAST}} = \\ &= x^6 + 2x^2 + \left( -8x^4\right) + \left( -16\right) = \\ &= x^6 + 2x^2 + \left( -8x^4\right) + \left( -16\right) = \\ &= x^6-8x^4+2x^2-16; \end{aligned} $$