Using the SharePoint Graph component
Use this component to store documents into a centralized, unified interface for enterprise users and highly flexible deployment options.
The following example provides you with the sample references of the component usage: Use Modern Authentication / OAuth2 and Token Vault.