Biodiversity contributes to ecosystem resilience by increasing the variety of species within an ecosystem. This variety allows for ecosystems to adapt to changes more effectively. With a diverse range of species, there is a higher chance that some species will be able to withstand environmental disturbances such as natural disasters, climate change, or invasive species. Additionally, biodiversity helps maintain ecosystem functions such as nutrient cycling, pollination, and pest control, which are essential for the overall health and stability of ecosystems.