A new study suggests you don’t have to quit social media for better mental health—just change how you engage to prioritize quality and connection.