The Sun can fit approximately 1.3 million Earths by volume. This is calculated by dividing the volume of the Sun, which is about 1.412×10181.412\times 10^{18}1.412×1018 cubic kilometers, by the volume of the Earth, which is about 1.083×10121.083\times 10^{12}1.083×1012 cubic kilometers.
More precisely, if considering how spheres pack together with empty space accounted for, the number of whole Earths that fit inside the Sun goes down to about 930,000 due to packing density, but the commonly referenced number is about 1.3 million assuming Earth's volume as a liquid that fills the space without gaps.