At the base of every food chain, plants act as producers. They harness the energy from the sun through photosynthesis to create food (glucose) from carbon dioxide and water.
This food not only sustains the plants themselves but also feeds the vast array of herbivores and, indirectly, the carnivores and omnivores that depends on those herbivores. Through photosynthesis, plants release oxygen, which is needed for the survival of most living organisms on Earth.