Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Hello Ashish Faustine,
Good day! Thank you for posting to the community.
In reference to this doc (Overview of dynamic membership for teams - Microsoft Teams | Microsoft Learn), to create a team that uses dynamic membership, you need to first create a dynamic Microsoft 365 group and then create a team from that group. This will therefore need a script to achieve. You will have to reach out to our PowerShell community via Microsoft PowerShell Community for better assistance.
I am sure that our experts from that team can address your query effectively and accurately.
Thank you for your cooperation and understanding. Please do not hesitate to post your queries to Microsoft Community and we will always do our best to assist you!
Sincerely,
Ashraf.