If there exist mailboxes and Exchange server for them, you could follow this article to decommission on-premises Exchange server and local AD that you want.
If there only exist local AD without Exchange on-premises, it seems that you could stop AAD Connect directly (I would suggest you double check with AAD team):
Set-MsolDirSyncEnabled -EnableDirSync $false
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.