Cause for this error: The SharePoint Online List uses ACS to acquire the access token to grant access to other applications. But for the tenant built after November 7, 2018, ACS is disabled by default.
Recommendations:
You need to enable ACS to acquire the access token.
Please refer to the following documentation for more details:
Connection failed after granting permission in SharePoint Online List
I hope this information helps.
Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.
Thank you.