To be specific, you can use the modern SPO Admin Center to adjust the sharing setting for any Teams site and then in each site itself you can do also some adjustments in the security and permissions