Remember that elements are pure matter, a collection of all of the same type of atoms. Oxygen is an element, and therefore oxygen gas is only made up of oxygen atoms. But water is a compound because it is matter made out of hydrogen and oxygen, two different elements bonded together.
The names of chemical compounds are important because the names tell us what they are made out of. Water can also be called dihydrogen monoxide, di (meaning two) and mono (meaning one) tell us how many of the atoms are present.
This can also be shown in the compound’s chemical formula.
H2O tells you that there are 2 hydrogens and one oxygen.
Chemical formulas tell you exactly which elements, and how many atoms of each of these elements, are in that compound.
When there is a number in front of the chemical formula, it tells you how many of that chemical compound there are.
If there are 3 molecules of water, it would be written as 3H₂O. That means there are six hydrogen and three oxygen (because there are 2 hydrogen for every water molecule, and there are 3 molecules, so 2 x 3 = 6).