When atoms of different elements become bonded together, we get a molecule of a compound.
A molecule of an element consists of atoms of the same element bonded together. In contrast, a compound is formed when atoms of different elements combine in a chemical bond.