Hi @anko,
To allow sharing only to part of the external users in a SharePoint Online library, you can restrict external sharing to specific security groups. In the SharePoint admin center, under External sharing, select Allow only users in specific security groups to share externally, and then select Manage security groups. From there, you can search for and select the security groups you want to use and choose whether they can share with authenticated guests only or anyone. This way, only users in the selected security groups will be able to share externally.
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.