Does this method work regardless of the number of ideals and
generators is what I mean.
Yes, it does. Let $I = (a_1, \ldots, a_m)$ and $J = (b_1, \ldots, b_n)$ be left ideals in a ring commutative ring $R$. Then
$$IJ = \{(x_1a_1 + x_1a_2 + \ldots + x_ma_m)(y_1b_1 + y_2b_2 + \ldots + y_nb_n) \}$$
and clearly $a_ib_j \in IJ$ for all $1 \le i \le m$ and $1 \le j \le n$. Conversely, every element in $IJ \setminus \{0\}$ is of the form $\sum_{i,j} z_{i,j}a_i b_j$.
An easy induction on the number of factors yields the result for $I_1I_2 \ldots I_n$ as well.
However, in a non-commutative ring we only get $(a_1, \ldots, a_m)(b_1, \ldots, b_n) \supseteq (a_ib_j)_{i,j}$.
As an example consider the ring of $2 \times 2$ matrices with integer coefficients. Then
$$
\left( \begin{matrix} 1 & 0 \\ 0 & 0 \end{matrix} \right) \left( \begin{matrix} 0 & 0 \\ 1 & 1 \end{matrix} \right) = \left( \begin{matrix} 0 & 0 \\ 0 & 0 \end{matrix} \right)
$$
and thus $ \left( \left( \begin{matrix} 1 & 0 \\ 0 & 0 \end{matrix} \right) \left( \begin{matrix} 0 & 0 \\ 1 & 1 \end{matrix} \right) \right) = (0) $, but
$$
\left( \begin{matrix} 1 & 0 \\ 0 & 0 \end{matrix} \right)\left( \begin{matrix} 1 & 1 \\ 1 & 1 \end{matrix} \right) \left( \begin{matrix} 0 & 0 \\ 1 & 1 \end{matrix} \right) = \left( \begin{matrix} 1 & 1 \\ 0 & 0 \end{matrix} \right)
$$
demonstrates $ \left( \left( \begin{matrix} 1 & 0 \\ 0 & 0 \end{matrix} \right), \left( \begin{matrix} 0 & 0 \\ 1 & 1 \end{matrix} \right) \right) \neq (0)$.