Here are a few options for a formal, academic title, depending on your preferred emphasis:
Option 1 (Most standard and precise):
“The Mediating Role of Family Environment in the Relationship Between Social Media Addiction and Mental Health Among University Students”
Option 2 (Direct and professional):
“Social Media Addiction, Family Environment, and Their Impact on Depression and Anxiety in University Students: A Mediation Analysis”
Option 3 (Concise and sophisticated):
“Investigating the Mediating Effect of Family Environment on the Association Between Social Media Addiction and Symptoms of Depression and Anxiety in University Students”
Recommendation: Option 1 is the most academically conventional format for research papers, as it clearly identifies the independent variable (social media addiction), the dependent variables (depression and anxiety), and the mechanism (family environment).