You could use PowerShell to realize it. Please note this needs administrator role.
Joaquin Guerrero wrote a blog to show how to add bulk users to Microsoft Teams private channels. You could refer to it here.
As we are mainly responsible for general question of Microsoft Teams, script is not supported by us. I will add office-teams-app-dev tag to get more efficient help. Thanks for your understanding.
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If the response is helpful, please click "Accept Answer" and upvote it.
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.