This one is hard or cannot to separate:
Because Exchange online and Azure AD are two independent products, so they have their own management commands. At the same time, they are included in Office 365. So, sometime, you have need to manage them with Office 365 command.
By the way, you don't need to remember a command is contained in which module, because if you run an Exchange command in Azure AD module, it will remind you that this is not an Azure AD command and tell you that you need to connect to Exchange online.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.