Suppose $M_1, \ldots M_k$ are all free $R$-modules of respective rank $n_1, \ldots n_k.$ Then, from the distributivity of tensor products over direct sums, we can deduce that $M_1 \otimes \cdots \otimes M_k$ is the free $R$-module of rank $\prod_{i=1}^k n_i.$. Indeed, first recall that given a set of free generators (a basis) $\{ m_1, \ldots m_n \}$ of the free $R$-module of rank $M,$ we can write $M = Rm_1 \oplus \cdots \oplus Rm_n \simeq R^n$ just as in the case of vector spaces. In this case, we get, with $B_i = \{m_{i_j}\}$ a basis for $M_j$ ($i_j = 1, \ldots, n_j$),

$M_1 \otimes \cdots \otimes M_k \simeq \displaystyle\bigoplus_{j=1}^{n_1}Rm_{1_j} \otimes \cdots \otimes \bigoplus_{j=1}^{n_k} Rm_{k_j}$

$\simeq \displaystyle\bigoplus_{j1=1}^{n_1} \left( Rm_{1_{j1}} \otimes \bigoplus_{j=1}^{n_2}Rm_{2_j}\otimes \cdots \otimes \bigoplus_{j=1}^{n_k}Rm_{k_j} \right)$

$\simeq \displaystyle\bigoplus_{j1=1}^{n_1} \bigoplus_{j2=1}^{n_2} \left( Rm_{1_{j1}} \otimes Rm_{2_{j2}} \otimes \cdots \otimes \bigoplus_{j=1}^{n_k} Rm_{k_j} \right)$

$\simeq \cdots$

$\simeq \displaystyle\bigoplus_{(j_1, \ldots, j_k)} \left( Rm_{1_{j_1}} \otimes \cdots \otimes Rm_{k_{j_k}} \right)$

where the last sum is taken on all multi-indices $(j_1, \ldots, j_k) \in \textbf{N}^k$ such that $m_{i_{j_r}}$ is an element of the basis $B_i$ of $M_i$ for all $1 \leq r \leq k$ and all $1 \leq i_{j_r} \leq n_i$ (fixed $j_r$). This is the free $R$-module on the set

$\{ m_{1_j} \otimes \cdots \otimes m_{k_j} \mid m_{i_j} \in B_i \}$

which indeed has cardinality $\prod_{i=1}^k n_i.$

I recommend writing down the particular case where $k = 2$ to clarify this as I’m sure the indices are confusing. Another way of showing that this set is a basis for $M_1 \otimes \cdots \otimes M_k$ is to show that the free $R$-module over that set satisfies the universal property of $M_1 \otimes \cdots \otimes M_k,$ namely that every k-multilinear maps from $M_1 \times \cdots \times M_k$ to some $R$-module $U$ factors uniquely through this set. Then since the universal property defines the tensor product of the $M_i$‘s uniquely up to isomorphism, we’re done.

As a corollary of this discussion, we get

Proposition: If $M$ is a free $R$-module of rank $n$ (for $R$ a commutative ring), then, if $B = \{ m_1, \ldots, m_n \}$ is a set of free generators for $M,$ the set of k-tensors $\{ m_{i_1} \otimes \cdots \otimes m_{i_k} \mid m_{i_j} \in B\}$ is a basis for $T^k(M).$ In particular, $T^k(M)$ is free of rank $n^k.$

Note that since a vector space of dimension $n$ over a field $K$ can be identified with the free $K$-module of rank $n,$ this proposition (and the whole discussion) is applicable to vector spaces.

Reference: D. S. Dummit, R. M. Foote, Abstract Algebra, 3rd ed.