The definition of a mole is the amount of a substance that contains as many elementary entities as there atoms in 12g (0.012kg) of carbon-12. The number of atoms in this quantity of carbon is defined by the Avogadro constant, 6.02 x 1023.
What is meant by the term 'elementary entities'?. It can be atoms, molecules, formula units, electrons, proton, neutrons etc.
Metals and most non-metals are regarded as existing as atoms and the formula unit is the atom. So 1mole of Al and 1 mole of He both contain 1 mole of atom or 6.02 x 1023 atoms. If the relative atomic mass of Al = 27 amu and helium = 4 amu, then 1 mole of Al will have a mass of 27g and 1 mole of He has a mass of 4g
One mole of a substance is its gram formula mass. One mole of sodium with a relative atomic mass of 23.0 will weigh 23.0g for one mole of atoms. One mole of sulphur with a relative atomic mass of 32.0 will weigh 32.0g for one mole of atoms.
Other non-metal elements such as hydrogen, nitrogen, oxygen, fluorine, chlorine, bromine and iodine are diatomic and the formula unit is the molecule. So one mole of hydrogen, H2 with a relative atomic mass of 1.0 for H, has a formula mass of 2.0 amu and will weigh 2.0g for one mole of molecules (6.02 x 1023 molecules).
The molecule is the formula unit for covalent compounds. So one mole of water, H2O with a formula mass of 18.0 amu will weigh 18.0g for one mole of molecules (6.02 x 1023 molecules). However, 1 mole will contain 2 moles of H atoms and 1 mole of O atoms
For ionic compounds, the simplest ratio of ions is the formula unit. eg the formula unit for Mg2+S2- is a unit containing a single Mg2+ion and a single S2- ion. 1 mole of Mg2+S2- will have a mass of 56.4 g and will contain 6.02 x 1023 formula units of Mg2+S2-. Each mole will be made up of 6.02 x 1023 Mg2+ ions and 6.02 x 1023 S2- ions.