There is nothing wrong with making mistakes. Humans err. None of us are perfect.
We have to keep striving to improve ourselves.
Every time we wrong someone intentionally or unintentionally we have to realise and become aware that we are wrong.
Yes, I made a mistake.
Get over the ego and apologise and don’t make the mistake intentionally again..
Ask Allah’s forgiveness and make a sincere effort to change the wrong and improve yourself.
That’s how we learn and become better.
That way we become compassionate towards others when they err, that is when we truly care for others and help them to change themselves, that way those who want to change, those who need help or advice come to us because they know you will not judge them rather you care and will give them sincere advise.
That way you become someone whom people trust and love and you become the agent of change.