To supplement the other answers by Taylor and mhdadk, I find it has never led me astray to have absolute clarity on the probability distributions with respect to which one is computing expectations.
And if the properties being used by the other answers are unfamiliar, then it can be useful to return to the original definition of expectation and conditional expectation, and to see how these properties are merely abbreviations for what is going on with the integral.
In the continuous case, i.e. assuming that $X, Y \in \mathbb{R}$, we have a marginal density $f_X(x)$, conditional density $f_{Y | X}(y | x)$, and a joint density $f_{X, Y}(x,y)$. Omitting the range of integration $(-\infty, \infty)$ as well as formal technicalities, we have that
\begin{align}
\mathbb{E}_{X, Y}[XY] &= \iint xy f_{X, Y}(x, y) \space dy \space dx \\
&= \iint xy f_{Y|X}(y|x) f_X(x) \space dy \space dx \\
&= \int f_X(x) \int xy f_{Y|X}(y|x) \space dy \space dx \space (= \mathbb{E}_X[\mathbb{E}_{Y|X}[XY \mid X]])\\
&= \int xf_X(x) \int y f_{Y|X}(y|x) \space dy \space dx\\
&= \mathbb{E}_{X} [X \space \mathbb{E}_{Y|X}[Y \mid X]]
\end{align}
From 1st to 2nd equality, I have the used fact that $f_{X, Y} = f_X \cdot f_{Y|X}$. From 2nd to 4th equality, both $f_X$ and $x$ can be factored out of the inner integral, because the inner integral is with respect to $y$. The final equality follows from the definitions. All integrals can be replaced with summations in the discrete case, which Xi'an has covered more generally and with a greater degree of rigour in the following thread:
Conditional expectation: an implication