Moles are central to your understanding of chemistry in the long term. Their importance can’t be overstated.
One mole is 6.02 x 1023 particles (which can be atoms, molecules or even FU’s!)
One mole is equal to the molar mass of any element, or of any compound.
One mole of any gas fits into 22.4 Liters of space, at standard temp and pressure.
That also means if you have one mole of neon, it’s mass is 20 grams, it fits into 22.4 Liters exactly and it has 6.02 x 1023 atoms present. Pretty cool math there.
As for percent composition by mass, that is the math behind how much each element in a compound makes up by percentage of the total mass. For example: sodium chloride is 58 grams/mole. There are only 2 ions in the compound, but the sodium cation has less mass than the chloride anion. Even though the atomic (or ionic) masses are different, once you get a mole of particles (FU’s here) the proportional difference is the same.
Sodium makes up 23 of 58 grams or 40% of the total salt. Chlorine makes up 35 of 58 grams in a mole of table salt, or 60% of the total mass. In any amount of NaCl, it will be 40% sodium and 60% chlorine BY MASS.
Read the BASICS asap!