Before you add a guest, it needs to create a team first. Then, add a guest to your team in Teams by adding member. For more information about how to create a team, please refer to this link:
https://support.office.com/en-us/article/Create-a-team-from-scratch-174adf5f-846b-4780-b765-de1a0a737e2b.
Moreover, guests must have a Microsoft 365 work or school account. If the guest doesn’t yet have a Microsoft account associated with their email address, they will be directed to create one for free. For reference, please read this article:
https://support.office.com/en-us/article/Add-guests-to-a-team-in-Teams-fccb4fa6-f864-4508-bdde-256e7384a14f
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.