Hi Ala,
There are definitely differences as SharePoint REST API is used for on-prem (SharePoint Server) and now Microsoft has migrated the cloud to Graph API.
Use the Microsoft Graph API
https://learn.microsoft.com/en-us/graph/use-the-api
Working with SharePoint sites in Microsoft Graph
https://learn.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0
If you are looking to migrate to the cloud I recommend you get used to Graph API as this is the way for people to interact with M365 services going forward.
If this is helpful please accept as answer or upvote.
Best regards,
Dillon Silzer | Cloudaen.com | Cloudaen Computing Solutions