Hi @Mohammed OUAHI,
For new tenants, apps using an ACS app-only access token is disabled by default. You can change the behavior by running set-spotenant -DisableCustomAppAuthentication $false
(needs the latest SharePoint admin PowerShell).
Then you should check if you are using the right url to register the app only. The url should be like following
https://contoso.sharepoint.com/sites/sitename/_layouts/15/appregnew.aspx
https://contoso-admin.sharepoint.com/sites/sitename/_layouts/15/appinv.aspx
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.