Hi @itech,
We can set SharePoint site level external sharing via SharePoint admin center >> Active sites >> Click the specific site name >> settings >> More sharing settings. You can disable external sharing for the specific site there.
And as per my knowledge, there is currently no library level external sharing setting available.
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.