Bricks can be thrown. Mortar can be slathered onto something. Put them together to make a wall, and you have something which can neither be thrown nor slathered, but can do things that loose bricks and separate mortar cannot (e.g. be leaned against). Sketchy analogy, I know, but the point is that when certain things are combined in certain ways, they can lose their former properties and acquire new ones.
Think about the properties of pure hydrogen. Think about the properties of pure oxygen. Now think about the properties of water. (Also consider the difficulty of separating said water into pure hydrogen and pure oxygen.)
Elemental atoms have certain properties. Often among these is the tendency/ability to form certain compounds. Once the compound is formed, the former properties of the constituent atoms are changed. For example, the Na in a NaCl molecule is not going to bond with a Cl atom that happens along - it can’t, because the structure that could do that is already doing that, and is not available anymore. Nor is it going to react with water the way pure Na does. It is not its former self while incorporated in a compound.
A compound is a whole different animal from its discrete building blocks.