Source: https://techjourney.net/disable-or-uninstall-onedrive-completely-in-windows-10/
Press Win + R keyboard accelerator to open Run dialog box. Type GPedit.msc and hit Enter or OK to open Local Group Policy Editor. Navigate to Local Computer Policy -> Computer Configuration -> Administrative Templates -> Windows Components -> OneDrive. In the right pane, double click on policy named Prevent the usage of OneDrive for file storage. Select the Enabled radio button.
Download and run the remove-onedrive.cmd
file