Mass spectroscopy
how it works
The mass spectrometer "sorts" isotopes according to their mass. It can also be used to analyse organic molecules.
Background

1.14 - 1.17 Atomic structure
If a nucleus was the size of a raisin, the rest of the atom would be the size of a sports stadium
https://www.mychem.co.uk/index.php/igcse-chemistry/principles-of-chemistry/atomic-structure
A mass spectrometer "sorts" particles according to their mass. A mass spectrum gives the relative abundance of particles of different masses. With an element - the relative abundance of the isotopes is given .This data is then used to calculate the relative atomic mass of the element.
When an organic molecule is analysed in a mass spectrometer the vaporisation and bombardment by high energy electrons process also fragments the molecule.
This produces a fragmentation pattern which provides a "fingerprint" for the molecule but also other information which can help identify the molecule.