Please check following tips to troubleshoot the issue.
1.Go to Microsoft Entra ID at https://entra.microsoft.com/ -> In the left navigation pane, expand External identities -> External collaboration settings -> Make sure that "Anyone in the organization can invite guest users including guests and non-admins" is selected.
2.Go to Sharing policy in the SharePoint admin center, check whether you click "Allow only users in specific security groups to share externally".
3.Go to the site collection with Full control permission account -> Site permissions settings -> Change how members can share -> Sharing permissions -> I suggest you choose "Site owners and members can share files, folder and the site. People with Edit permission can share files and folders". Also, make sure you have at least Edit permission for the site collection.
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.