When sharing emails going out, SharePoint uses the email address of current user. For example, if user A adds user B into a group, SharePoint will use user A's address as From address.
Please make sure that sharing users have valid email address and check the Exchange configuration.
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.