Dear Student
Compounds are which have different atom and arranged in a definite ratio, where as element are those which are made by same type of atoms.
For sugar(C12H22O11) three different types of atoms are there these are C,H and oxygen side by side their ratio is 12:22:11 So sugar is a compound not a element.
for water (H2O) There are two types of atoms one is hydrogen another is oxygen and their ratio is 1:2 so water is a compound not a element.
For iron sulphide(FeS) there are two types of atoms one is iron and another one is sulphide in the ratio 1:1 so iron sulphide is a compound not element.
Regards