Humbly accept that you could be wrong, and be open to feedback. Turn it into a teaching moment when possible by inviting the student to come up and show their solution. If they are wrong, dontdon't tell them why, but instead ask they class if they see any problem with the approach. It will not only get the class involved, but it will humble the student from trying to show off their knowledge. If you are the one that is wrong, simply admit it, explain the error in your thinking, thank the student and move on. This way it moves away from an "I'm right and you are wrong" argument, but a way for other students to recognize where mistakes are possible and to learn from it.
If the student is consistently disruptive, speak to them personally and ask them not to be disruptive, but to please bring their concerns to youryou privately. Obviously, you want the class to know when/if you are making mistakes, and you should humbly tell the class when the student doesdoes reveal an error in your logic so they can learn from it. But you dontdon't want the disruptions to become a distraction from the materials you need to get through.
Look at it this way,: would you rather focus be on proving the student wrong and defending your reputation, or would you rather focus on helping the class to learn, regardless of who is making mistakes? We all make mistakes. Help your students to learn from them.