Sun is ultimate source of energy.
The producers convert solar energy into chemical energy in the form of organic compounds.
The primary consumers (herbivores) derive their nutrition from the producers.
The energy that is captured by the producers does not revert back to the Sun and the energy transferred to the herbivores does not come back to the producers.
It just keeps on moving to the next trophic level in a unidirectional way.
That is why the flow of energy in the food chain is always unidirectional/one way.