Apologize and Do Better
Everbody makes mistakes.
Everybody acts in ways, says things, and does things that they regret.
Insecurity and fear make people act in awful ways. When confronted with these actions by someone who has been hurt, unfortunately a lot of people deny, justify, or even get mad and say they didn't think or didn't know or make up an excuse and hope the other person believes it.
There is shame in hurting others and it is embedded in one's own conscience. The only way to release it is to allow vulnerability and apologize. "I'm sorry, I acted like a jerk and I regret it" heals so much more than trying to run away from the shame by playing dumb or deflecting.
Apologize and do better.
That will ensure that others won't be hurt and you won't have even more regrets and shame to deal with in the future.