I cannot recommend enough Kathryn Schultz’s Being Wrong: Adventures in the Margins of Error. I’d put it right up with The Drunkard’s Walk and Thinking Fast and Slow as formative works on how to understand the world and the people in it. It doesn’t directly answer OP’s question of how we can know if we’re right, but it does answer why people are so, so reluctant to admit they’re wrong.
It kicks off from the point that the feeling of Being Right is one of the simplest, most accessible, most unimpeachable pleasures a person can have. People will revel in being right even when the outcome is bad (“I told you we’ve been walking the wrong way for 15 minutes!”). Being wrong is associated with shame, stupidity, ignorance and immorality. “Rightness” is a feeling our mind will perform impressive gymnastic feats to protect, to the point that we will hold two completely contradictory beliefs in our head at the same time, rather than admit that they can’t both be true.
To paraphrase, we have powerful social, psychological and practical reasons to think that what we believe is true. But we, individually, don’t think that these social, psychological and practical reasons contribute to why we believe something. We, individually, think something is true “Cuz It’s True.”
I believe that Ocarina of Time is the best game ever made. But when I’m arguing with someone about it, I’m not going to say that the reason I think it’s the best game ever is because I was playing it when I met my future wife, and one of the first things we did together was start over and play through it together. That obviously has nothing to do with why Ocarina is better than any other game, so it just as obviously has nothing to do with why I believe Ocarina is better than any other game. But if it were someone else, I would say “of course that’s influencing why you think it’s the best game ever.” {Yes, it’s not really “wrong” when it’s something this subjective, but it still illustrates how we’ll discount obvious external factors influencing our beliefs.} To borrow a quote that Schultz borrows from Ward Jones:
It simply does not make sense to see myself as both believing that [something] is true and being convinced that I do so for reasons having nothing to do with whether [that thing] is true.
Therefore, anyone who doesn’t believe as we believe either: doesn’t have the facts, is too dumb to understand the facts, or is willfully ignoring the facts.
The point isn’t whether or not we are correct in any specific instance, the point is that it doesn’t matter. This is our default position for any specifically held belief.
It can actually be pretty dispiriting to read at times. Being wrong, and refusing to budge from that position, can have disastrous consequences for yourself and others. It’s heartbreaking to read about people who have been wrongfully convicted based on the testimony of the victim, both from the standpoint of the wrongfully accused, but also from the standpoint of the victim, who 100% believes they have properly identified the culprit. Having that belief proven wrong can be pretty shattering. And there’s no easy answer on how to get someone to stop believing something that’s wrong. Just look at the current Seth Rich conspiracy theorists, who take every new piece of information that should, logically, dispel their theory and twist it into “proof” of a cover-up.
The book does, however, end on a relatively positive note, and that’s that if we want to do something about this, it’s actually pretty simple. We just have to admit that we’re wrong about being wrong. Recognizing and admitting error can actually feel great. It can be really funny! If we’re never wrong, we can never be pleasantly surprised. Artists intentionally depict a “wrong” world in order to reveal a more fundamental truth. Being wrong is a fundamental part of the scientific process. Error isn’t just inevitable, it’s essential. We have to stop acting like admitting we are wrong is the worst thing in the world.