Where does the energy come from which is needed for an endothermic reaction?
Where else but from the surroundings?
Consider the reaction.......
Hold ice in your hot little hand, and your hand feels cold as the ice melt. Energy, as heat, is transferred from your metabolism to the ice-block.
Run a hot bath, and if you leave it too long, the bath water will become tepid; it loses heat to the surroundings.
And so the heat must come from somewhere. In an exothermic reaction, for instance hydrocarbon combustion, energy is released when strong chemical bonds are made, i.e.
In the give reaction we have to break strong