Just teach your kids, that it is not nice to use.
They don't have to use it.
They don't have to be copy cats.
To think on their own.
Unfortunately, even in school, even Kindergarteners, use all sorts of language. So then they get corrected by the Teacher or the other kids.
It is also about learning inappropriateness.
I cursed before in front of my kids. My son told me "Mommy, that is a bad word..." And he corrected me. I told him I know it was a mistake I make mistakes and he is right. It is not a nice word. I apologized to him.
And I tell my kids, just because I said that, doesn't make it right, nor that they can say it. And sure, it is conflicting.
One kid I know, who was in 1st grade, tends to talk like his older, siblings. And per what shows they watch, so then he is an audience to those shows, too. Anyway, one day the Mom got a call from his Teacher. Telling her that her son does not speak, as a normal 1st grader does and uses words/language that is.... basically, inappropriate for his age. But which, mirrors whatever TV shows he is watching. He is like a parrot. So well, the Mom was spoken to about it, by the Teacher. She didn't realize, her son was talking this way, AT school. She was embarrassed.
Anyway, not all kids will curse, like their parent. Some kids do know better.
And per age.