This change in the populations is an example of competitive exclusion.
Competitive exclusion occurs when two species compete for the same resources, and one species is better adapted to the environment, leading to the decline or local extinction of the less adapted species. In this case, gray squirrels are better adapted to eating acorns, allowing them to survive and thrive when red squirrels struggle with this food source after the loss of hazelnut trees.