How do I avoid being wrong? I use two practices:
1) I don't make claims* unless they are based in facts I have learned, or if I make it clear that I am only stating an opinion (such as "mint chocolate chip ice cream is the best").
2) If I am about to make a claim and I don't remember how I learned it, I look it up to confirm that it is true before I make that claim.
(Note: these practices are my goals and sometimes I fail at them, to my own embarrassment.)
If the topic is not something I'm an expert on, or if I have no experts to refer to, I don't make claims, or I phrase them as possibilities so that it's less embarrassing when I AM wrong. I usually learn that I was wrong in a passive way, where someone else makes a claim and I say, "oh I didn't know that!" I will look it up later if I feel unsure it is true, and if it is true, then I learn how I can behave or speak in the future to avoid causing harm.
When you phrase all of your opinions like factual claims, like defaults** are trained to do, all conversations force people into completely accepting or completely rejecting your claim. For example, a claim such as "this thing is bad" can be right or wrong but not both.
When I make a claim such as "this thing is bad," without references, that statement is resting on my authority as a person. If I have no facts to back it up, that proves my authority not useful (at least in that instance). But if I say "this thing might be bad" then if it turns out to not be, I wasn't wrong or right. I was considering.
If I say, "it seems to me like this thing is bad" then even if my viewpoint is incorrect, I was still correct in stating that I had that viewpoint. And once I realize my viewpoint was wrong, I can say "okay so the answer to my wondering if this was bad is 'no'." This is much better than feeling like I have to defend my previous claim when it makes no sense to do so because I know it was wrong!
And how do I handle it when I am wrong? I inform the people who I talked with about it that I was wrong, if I am friends with them. I usually explain my thought process to show where I made the mistake, and I explain how I learned what the correct thing was.
If I feel like me being wrong affected more people than the people I talked with directly, I also inform my broader social circle via a (usually public) social media post. I feel like this is important because I don't want to spread misinformation. But I also do it to avoid the embarrassment of having to talk about being wrong over and over in future conversations.
This process is very embarrassing but at least then it is over, and I don't have to dread it happening in the future. If I were to just drop conversations or start ignoring people when I realized I was wrong, I would then have the fear of being found out hanging over me.
I think it also encourages people to tell me when they think I am wrong, because I have shown that I will not attack people for telling me that, and I have shown that I will change. I'm not perfect and sometimes I am stubborn, but growth is always my goal.
*claim: a statement of fact, like "cats have fur" (which is a great example of the kind of claim you shouldn't make!)
**cisgender, white, male, nondisabled, straight, non-poor, etc