species living in the same ecosystem using different resources to avoid competition between species

This is known as resource partitioning. When two or more species occupy the same ecological niche, they may compete for the same resources such as food, habitat, or water. In order to avoid competition and survive in the same ecosystem, each species may evolve different strategies to use different resources. For example, different bird species may feed on different types of insects, or have different beak shapes to access different types of food sources. Similarly, different tree species may grow at different heights or in different soil conditions to access different nutrients. This allows multiple species to coexist in the same ecosystem without outcompeting each other for resources.