Urbanization affects ecosystems by reducing biodiversity and displacing species from native habitats. While some suffer, others, like urban wildlife, adapt through innovative feeding and behaviours that improve their fitness in human‐altered settings. Despite research on wildlife in urban areas, the development of foraging behaviour in urban species is still understudied. Here, we examined the age‐related differences in the foraging behaviour of yellow‐legged gulls Larus michahellis in Barcelona (Spain), a densely populated coastal urban ecosystem. Using biologging technologies and trophic markers, we compared the foraging strategies, habitat use, human interactions, and trophic niches of juvenile, immature, and adult yellow‐legged gulls over three breeding seasons. The results showed age‐related differences in spatial distribution and foraging behaviour in this opportunistic species. Juveniles and immatures mainly foraged in ports and at sea, while adults favoured urban habitats. These patterns likely stem from reproductive constraints in adults and lower foraging efficiency in younger birds. Adults' primary use of urban habitats also explains their higher trophic niche. Furthermore, fishing activity significantly influenced yellow‐legged gull foraging across age groups, with strong associations between gulls and fishing vessels. By studying how age and life stage influence habitat use and behaviour, this research provides insights to guide targeted management strategies for this species.