If you’re seeing the 0xE4020040 error code, OneNote can't sync one or more notebooks because the server where your notebooks are stored is temporarily busy or unavailable. This can happen because of routine server maintenance on OneDrive or SharePoint.
OneDrive
If you can't sync notebooks on OneDrive, check the Microsoft 365 Service Status page for any OneDrive maintenance or outage information. If the OneDrive service is running normally, try syncing your notes again in a few minutes.
SharePoint
If you can't sync notebooks on SharePoint, try syncing your notes again after a few minutes. If the issue persists, contact your SharePoint or IT administrator for assistance.
More help
If you’re still seeing this error message after a long period of time has passed, please report this issue in the OneNote Community forums so we can investigate the cause and find a solution.