Troubleshooting: 1. Login Office 365>Admin>OneDrive>Share, check the Shareable: Anyone with link.
2. If that doesn’t fix the problem, In the same page: Admin>OneDrive>Share, make sure External share bar is in the top.
3. If you can set SharePoint Most permissive to top bar, Anyone, but not OneDrive, you may need to check the SharePoint share settings as shown below.