In glycolysis, a total of 4 ATP molecules are produced. However, 2 ATP molecules are used in the early steps of the pathway, resulting in a net gain of 2 ATP molecules per glucose molecule metabolized.
To clarify, none of the ATP produced in glycolysis is directly fed back into the glycolytic pathway itself to keep it ongoing. Instead, the ATP produced can be utilized by the cell for various energy-requiring processes. The glycolytic pathway is primarily regulated by the availability of substrates and the activity of key enzymes rather than by the direct re-utilization of its own products.