Hi Mageshwari SS,
Thank you for contacting Microsoft!
Both OneDrive and SharePoint use the same underlying Microsoft Graph API for authorization and permissions management. As you have setup for OneDrive using OAuth 2.0 should also work for SharePoint account.
Please review the document shared and the permission required for accessing the SharePoint as per the Graph API used: -
https://learn.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0
If you need to access the content of a site, you will need to assign the "Sites.Read.All" permission. Please ensure that the appropriate permissions are assigned based on the tasks you need to perform.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.