Hello Ankush Kumar,
Thank you for reaching out to Microsoft Support!
For information about using the Graph SDK you can refer to this document:
https://learn.microsoft.com/en-us/graph/sdks/sdks-overview
The Graph API endpoint to upload the file is in this document:
https://learn.microsoft.com/en-us/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http
The official Graph SDK code for uploading large files can be viewed in this document:
https://learn.microsoft.com/en-us/graph/sdks/large-file-upload?tabs=java
Code shared by other users:
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.