I think that in this answer, you have to consider the set $\mathcal S=\{m_j \mid 1≤j≤n\}$ of the minimal polynomials of the roots $x_j$ of $f(X)$. Then the claim is "$f(X)$ is the product of the $m(X)$'s belonging to the set $\mathcal S$". In your example $\mathcal S=\{X^2-2\}$.
Let $f(X) \in k[X]$ be a separable polynomial, and let $x_1,\dots,x_n \in F$ be the roots of $f$ in some extension $F$ of $k$ (where $n=\text{deg}(f)$). Let $m_j \in k[X]$ be the minimal polynomial of $x_j$ over $k$, and define $\mathcal S$ as above.
Notice that $m_j \mid f$, since $x_j$ is a root of $f$. Then $m_j(x)=0 \implies f(x)=0$, so that every root of $m_j$ is one of the $x_i$'s. The roots of $m_j$ can be denoted by
$R_j = \{\, x_{i_{1,j}} \;,\dots, x_{i_{n_{\,j},\,j}} \,\}
\subset \{x_1,\dots,x_n\}$
Notice that if $m_i \neq m_j$, then $R_i \cap R_j = \varnothing$. Indeed, suppose that $z$ is a root of $m_i$ and of $m_j$. Then the minimal polynomial $m$ of $z$ over $k$ is $m_i$ (because $z$ is a root of $m_i$), and it is also $m_j$, so that $m_i=m=m_j$.
Moreover, every $x_j$ belongs to $R_j$, by definition. Therefore, the $R_j$'s form a partition of $\{x_1,\dots,x_n\}$, so that
$$f(X)=(X-x_1)\cdots(X-x_n) =
\prod\limits_{m_j \in \mathcal S} \;\prod\limits_{z \in R_j} (X-z) =
\prod\limits_{m_j \in \mathcal S} m_j(X)$$
(since $f$ is separable, so are the polynomials $m_j$, and then $\prod\limits_{z \in R_j} (X-z) = m_j(X)$)
Hence $f(X)$ is the product of the (distinct) minimal polynomial of its roots.