Electron - negligible mass, negative charge, orbits the nucleus
Proton - 1 AMU, positive charge, in the nucleus
Neutron, 1 AMU, no charge, in the nucleus
The mass of an element listed in the Periodic Table is the weighted average of all its naturally occurring isotopes.
Naturally occurring carbon is about
99 % carbon-12 (12.000 u) + 1 % carbon-13 (13.003 u).
That extra carbon-13 makes the <em>average atomic mass</em> greater than 12.000 u.
Reword it so we can understand it better, to answer your quetion