Cellular respiration
This is where most of the ATP is made. All of the hydrogen molecules which have been removed in the  steps before (Krebs cycle, Link reaction) are pumped inside the mitochondria using energy that electrons release. Eventually, the electrons powering the pumping of hydrogen into the mitochondria mix with some hydrogen and oxygen to form water and the hydrogen molecules stop being pumped.