This change in the populations is an example of natural selection.
The red squirrels were not well adapted to the new food source (acorns) after the hazelnut trees were killed off, leading to a decrease in their population. In contrast, the gray squirrels, which were better adapted to eating acorns, were able to thrive and gradually replace the red squirrels. This is a classic case of natural selection where the environment favors one species over another based on their adaptations.