How do isotopes affect average atomic mass?
To understand how different isotopes affect average atomic mass let's look at the example of carbon. Carbon atoms come in three different versions; carbon-12, carbon-13 and carbon-14. The isotope has its own mass and relative abundance (how common it is)
Carbon-12 atoms have a mass of 12 atomic mass units (amu) and makes up 98.93% of all carbon atoms.
Carbon-13 atoms have a mass of 13.003amu (rounded) and make up 1.07% of all carbon atoms.
Carbon-14 atoms have a mass of 14.003amu (rounded) and are unstable so they make up 0% of carbon atoms (They break down into Nitrogen-14 atoms by the process of beta decay)
So the average mass of carbon (12.011 amu) is calculated based on the mass and abundance of its isotopes. You can see that the average is much closer to the mass of carbon-12 atoms since these atoms are by far the most common carbon atoms out there!
Here is an example of how this type of data is used to calculate average atomic mass using magnesium as the example element.
Hope this helps!