Let $(X, \mathscr{S}, \mu)$ and $(Y, \mathscr{T}, \lambda)$ be two $\sigma$-finite measure spaces. Let $\{ \phi_i\}_{\in I}$, $\{\psi_j\}_{j \in J}$ be two orthonormal bases for $L^2(X,\mu)$ and $L^2(Y, \lambda)$ respectively. For $i \in I$, $j \in J$, let $$\theta_{ij}(x,y):=\phi_i(x)\psi_j(y), \,\,\,\, (x\in X, y \in Y).$$
Is it true that $\{\theta_{ij}\}_{i \in I, j \in J}$ is an orthonormal basis for $L^2(X \times Y, \mu \times \lambda)$ ?
Answer is yes whenever either $L^2(X)$ or $L^2(Y)$ is separable. See for instance the following.
Orthonormal basis for product $L^2$ space
The question is precisely for the case when both $L^2(X)$ and $L^2(Y)$ are not separable i.e. both $I$ and $J$ are uncountable.