It happens to EVERYONE.
If you were moody and snapped at someone and feel bad about it, apologize and let it go.
If you were wrong about something, so what. Usually people don't get mad about someone being wrong, but rather about someone being wrong and not admitting it. In fact, "admitting to being wrong" was once described as "admitting to know more today than yesterday." There's no shame in that. It's a good thing. We're all here to learn.
Be honest, be humble, and be accepting of yourself and others.
Then, you'll be good.