Of course. Kids learn by modeling, so you take responsibility when you mess up. My parents didn’t do it often, but when they realized we knew they’d made a mistake, or said something hurtful, they always apologized.
Every kid eventually realizes their parents are imperfect, right? So it’s not like you’re going to destroy any illusions or show weakness or anything if you apologize. But by modeling responsibility and kindness, you show them it’s OK to make mistakes sometimes, but it’s what you do afterwards that’s most important.
I also make sure they see their dad and I apologizing to each other, and thanking each other, so they know what a healthy relationship looks like.