Well, it kind of depends on which goals you want to fulfill in your career and which goals you would be content fulfilling with volunteering and other experiences. For example, I love to teach high school and college students, but my current job provides limited opportunities for doing that. So I volunteer on the weekends to teach writing classes to high schoolers in an enrichment program; my day job is mostly unrelated to that.
The other thing is that your career goals and the way you like to work, plus how much education you want to get, will decide what you choose. For example, to do sociological or psychological research of social media on loneliness (that sounds more like psychology than sociology, although you could probably study it in both), you’d need a PhD in that field (which takes 5-7 years) plus probably two years of postdoctoral research to get a position as a researcher at a university, a think tank, or a nonprofit organization that studies that. The other thing is that your contributions would be relatively indirect; PhD-level researchers write papers that are read by other scientists and practitioners, and it can take years for your ideas to filter down to people who actually take your work and build applications. Some people really love that high-level, basic, theoretical research! And other people get frustrated with it and would rather have a more direct impact.
There are lots of careers that accomplish #1 - like you already mentioned, social work (and clinical/counseling psychology and marriage and family therapy) can do that, but you can also do that through working for a social media company (potentially as a software developer but in a lot of other roles as well) or a company that does matchmaking, like eHarmony or Match dot com.
There are lots of majors that investigate #2. The obvious ones are environmental science, earth and ocean sciences (like geology, meteorology, atmospheric science, geography, earth science, etc.), chemistry, and physics, maybe biology as well (like animal science or wildlife biology). Some schools have majors that focus on sustainability and conservation. College of the Atlantic is a college that focuses on human ecology, broadly defined. There’s also majors like forestry, which are less often pursued.
But there’s other ways to do that, too - like political science could lead you into studying/working in environmental policy, or sociology can end up with you studying how people and groups interact with their natural world/environment, or math or statistics can lead into you analyzing big data to solve environmental problems.
I guess the point is - there’s no one major, or even a circumscribed set, that lead directly into either of the things you want. There are many routes there!