Hello, @Zakaria Muhammad ,
Per my test, SharePoint App-Only access token works fine on my end. I used the same way as yours. Did you use the access token as the below:
For Azure AD App-Only for SharePoint, you could get the access token like this:
Grant Type : Authorization Code
Callback Url : this should be the AAD App redirect Url
Auth URL : https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3A%2F%2F<tenant_name>.sharepoint.com
Access Token URL : https://login.microsoftonline.com/common/oauth2/token
Client ID : <client_ID>
Client Secret : <Client-secret>
When you click Get Access Token, it would request you to sign in. After signing in, you would access it successfully.
Reference: https://www.ludovicmedard.com/use-postman-and-azure-ad-to-send-rest-request-to-sharepoint-online/
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.