It is common and okay for parents to lose their calm if their kids are being unreasonable or even if the parent themselves is just having a bad day. if you have recently yelled at your kid and feel guilty about it, here's how you can fix it:
Reach out to them when you calm down
Validate your child's emotions and their hurt
Try and have them speak out about how they felt when you yelled at them
Do not try to justify your yelling
Show love
Apologize without any conditions