
Hi @Daniel,
Thank you for posting in this community.
Unfortunately, we don't have a way to remove this share button. It's designed by SharePoint, and we can't change it.
As the name SharePoint suggests, its main function is to make it easy to share and collaborate on files. The Share button is a one-click button that makes sharing faster and easier. Therefore, the Share button was never designed to be removable.
If you don't want people other than the site's owner to be able to share the site's content, you can click on the gear above >Site permissions >Advanced permissions settings >Access Requests Settings >Uncheck "Allow members to share the site and individual files and folders."
This way the share function won't work even if the share button is present.
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.