On that note, particularly if you're a newer diver, learn to avoid the temptation to surface quickly when you run into an uncomfortable situation. In most early rec diving that's absolutely an option, but as you find yourself interested in deeper dives, wreck penetrations, caves and other sites that are both an incredible experience and higher risk that's where accidents happen.
Focus on being able to calm yourself, trust your dive buddy, recognise signs of impaired cognition in both yourself and them, and work through whatever situation you find yourself in as a team. It's not a solo activity and any action you take impacts both of you.