If you want to Turn off directory synchronization for Microsoft 365 you must execute this command:
Set-MsolDirSyncEnabled -EnableDirSync $false
If you want to reactivate the credential synchronization between your local AD and your Microsoft Entra ID, you must reinstall the Azure AD Connect.
If you still have errors, please share the error log output.
Hope this helps!