1.Go to SharePoint admin center -> Policies -> Sharing -> External sharing -> Set "Content can be shared with" as "Anyone".
2.Go to Microsoft 365 admin center -> Active users -> Select the account -> OneDrive -> Manage external sharing -> Allow sharing with anonymous guest links and authenticated users.
If an Answer 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.