While some organic molecules also contain other elements like hydrogen, oxygen, nitrogen, phosphorus, sulfur, and halogens, carbon is the defining element that makes a molecule organic.
The reason for this is that carbon's ability to form four covalent bonds with other atoms allows it to create a wide variety of complex and diverse molecules with unique properties. This diversity is the basis for the vast array of organic compounds found in living organisms and in the world around us.