Hi @Stefano Colombo ,
Welcome to the Microsoft Q&A platform!
In a hybrid environment, the Online Global Address List (GAL) is indeed created from objects synchronized from your on-premises Active Directory (AD) using tools like Microsoft Entra Connect (formerly Azure AD Connect).
Regarding your second question, if distribution groups are synchronized from on-premises to Exchange Online (ExO) but some members are not present in the tenant (i.e., not synced with Entra ID connector), those members will not appear in the distribution group in ExO. This can cause incomplete or missing group memberships in the cloud.
As for synchronizing AD "mail contacts," yes, they can be synced without issue. Mail contacts created in your on-premises AD can be synchronized to Exchange Online, allowing them to appear in the GAL and be used for email routing.
Please feel free to contact me for any updates. And if this helps, don't forget to mark it as an answer.
Best,
Jake Zhang