OneDrive is the files app for Microsoft 365, and it is a powerful sharing tool, too. Sharing can be managed and customized by broad or granular policies.
Microsoft happy to announce that they have now added the ability to set custom passwords while sharing a file or folder with anyone links to their colleagues within or outside their organization. You can share the password separately with your intended recipients and they will be required to enter the password in order to access the shared content. If they accidentally forward or re-share the shared link, anyone without the password will not be able to gain access.