Good dialogue sounds exactly like what the characters would actually say.
Some characters swear and some don't.
Reproducing authentic sounding speech is probably the hardest part of writing. Very few writers get it right.
You need to begin by listening to people, and by training yourself to remember what people say.
It makes no sense to create an character and then say well okay, but this character isn't going to talk the way people talk in real life.