Not all modern birds are intelligent - some like chickens are clearly not, which is understandable because they don't need to be. However, the sheer variety of habitats and food sources utilized by birds (from raptors to penguins, ostriches to hummingbirds) would seem to indicate that generality and intelligence may have developed early as they were pushed to, and able to, explore new environments, and survive climate and other challenges over the millenia. Some birds like covids are still generalists and therefore highly intelligent, while others have settled into much narrower behavioral niches and have therefore lost it (or perhaps never had it).