You can restrict Microsoft 365 Group creation, for example, to the members of a particular security group.
To restrict the creation of new teams, you need to modify the Microsoft 365 Groups creation permissions since all teams are based on Microsoft 365 Groups.
If you want to restrict the creation of new Teams to a subset of users, you need to create a security group and use the AzureAD PowerShell module to modify the AzureAD Directory Settings on a tenant basis. If you run the following script in your environment, you will stop users from creating new Microsoft 365 groups unless they are a member of the security group you specified in the first line of the script.