For Exchange server, after you migrated all mailboxes and needed public folder to Exchange online, if you don't need to use Exchange on-premises. You could uninstall the Exchange on-premises and local AD: How and when to decommission your on-premises Exchange servers in a hybrid deployment
If you still need to local AD function, such as login in computer with local AD account credentials. You need to keep local AD and at least one Exchange server. Actually, after migrating AD accounts to Azure AD, all computers could join AAD domain and login with AAD credentials.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.