What is the difference between mass number and atomic mass?
An individual atom has a set number of protons and neutrons which each have a mass of 1 amu. This causes the mass number to be a whole number.
Not all of the individual atoms of a given element the same number of neutrons ( always the same number of protons). So the average mass of an element is rarely a whole number.
An example is Boron. Roughly 20% of Boron atoms have a mass of 10, having 5 protons and 5 neutrons. The other 80% of the Boron atoms have a mass of 11, having 5 protons and 6 neutrons. This gives an atomic mass for Boron of 10.8