Oxygen atoms does become more stable when forming compounds as either ionic or covalent compounds are formed, leading to a full valence shell. a full valence shell is obtain due to giving (ionic) or sharing (covalent) of the electrons
Energy may exist in different forms such as potential energy when a body is at rest, kinetic energy when the body is in motion, etc.
Energy can neither be created nor destroyed, however, it can be transformed from one form to another. For example, chemical energy may be transformed into mechanical energy or other forms of energy.