Hi @Maryam Adib
You can use the graph API to upload files to drive items in SharePoint document library, but adding attachment files to list items is not currently supported.
There is a similar feature request on the graph feedback forum, and you can upvote this thread to increase the priority of the request.
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".