As SharePoint and OneDrive are both Microsoft products, they obviously share many of the same security features. They both assure that all data is encrypted (TLS and SHA-2), both at rest and in transit. They both make it simple to undo undesired modifications, such as when papers are mistakenly erased. They both include a variety of features to assist businesses in meeting the applicable regulatory compliance requirements. Yet you must know about microsoft teams solutions as well.
While MS 365 provides the same level of access control as SharePoint, SharePoint enables for more granular access controls than OneDrive. This is because OneDrive (as a standalone product) is primarily aimed at personal users, who would not benefit from the granular access controls given by either MS 365 or SharePoint.
Robust access restrictions are required to avoid, or more precisely, contain data breaches, making it easier for security teams to isolate and remove harmful payloads without causing too much disturbance to the broader network. However, the capacity to host your own data may, in some cases, provide the finest security results. You must also checkout with the sharepoint service.
In practice, though, it is probably best to trust the security mechanisms set by Microsoft, as they will have a team of highly competent support engineers available around the clock. It is also worth noting that you have the option of encrypting any data before uploading it to the cloud, guaranteeing that even the cloud provider cannot access your sensitive data.