Can you clarify what exactly you mean here? If you are looking to provision a mailbox to an Azure AD user, this is done by assigning an Exchange Online license to the corresponding user account. There are multiple way to automate the license assignment process, including PowerShell, Graph API, the use of group-based licensing, and so on.
If you mean the process of configuring Outlook profile for the user, Autodiscover takes care of that. Make sure your Autodiscover record is properly configured as instructed by the "add domain wizard". To further automate the process, you can use the ZeroConfigExchange method as detailed here: https://techcommunity.microsoft.com/t5/outlook-global-customer-service/zeroconfigexchange-automating-the-creation-of-an-outlook-profile/ba-p/389691