The amount of energy that is available in the ecosystem is equal and same is equally distributed.
Plants use solar energy and convert it into usable energy for processing food and water in tissues and reproduction and root development.
Later on when the plant dies or is eaten up the dead organic matter is converted to energy that is derived by the herbivorous or primary consumer.
When then (90%) lost through respiration and digestion, waste generation in the body.
After which the energy left may be again taken up by some secondary consumer and only 10% energy remains while the rest is diffused in the ecosystem and environment.
Thus energy is neither created nor destroyed but transformed in its form.