https://pt.ihoctot.com/when-language-is-studied-in-relation-to-larger-social-systems-this-is-called-sociolinguistics
When language is studied in relation to larger social systems, this is called sociolinguistics.