Hello @IBN
You are going to want to enable external access for Teams through the Teams Administrator (https://admin.teams.microsoft.com/)
https://learn.microsoft.com/en-us/microsoftteams/communicate-with-users-from-other-organizations
------------------------------------
Under Users > External Access > Choose which external domains your users have access to: > Choose your setting of allowing external access
If you only want specific domains to have external access you should Allow only specific external domains
-----------------------------
If this helps please don't forget to mark as correct answer. Thanks!