I promise that I'm not trying to make this post all about my stories, but here's what I've done regarding characters and dialogue.
When I begin writing a story, I always have some idea of who the characters are. Their age, their appearance, their attitude. I'll think about where they grew up and went to school, etc. Some of my characters don't have English as their first language, so their dialogue will sound different.
.
The following examples are set in 1926...
A Swedish woman visiting the U.S. speaks more formally, and doesn't use contractions: “Forgive me, gentlemen. I do not know how to proceed.”
A guy from Eastern Europe who's been in New York for a decade speaks like a gangster: “I’m sure it’ll be fine. But you’re gonna ruin your gloves, doll.”
An older college professor, kind of dorky: “Golly, Mrs. Qvistsjö, you had us going for a minute.”
A younger PhD student, educated but not dorky: “You’re more than just a pretty young thing. Anyone can see that.”
19-year-old flapper #1: “Gosh, don’t be such a killjoy! Are you gonna be like this at the séance tonight?”
19-year-old flapper #2: “Nah, forget it. Everyone would be hopping mad if we got caught.”
Flapper #1's mother, arrived from Eastern Europe as a young girl, with no trace of an accent anymore: “I know they said it was over between them, but no sense in allowing them the temptation, n’est-ce pas?”
Flapper #1's mother, imitating her Eastern European father: “Zat vos my daughter. Not my vife.”
A Black man with long fingers from the American South: “My mama made me keep my hands out of sight when we went into town. There’s only two things folk’ll think those fingers are good for, she’d say. Playing piano and picking pockets. And we ain’t got no damn piano.”
.
And a few examples from more modern times...
19-year-old bad girl #1 who did well in school: “Look, Mrs. M. I appreciate what you’re tryin’ to do for me, but it just isn’t gonna work.” (Notice that she says “isn’t gonna”—correct grammar but informal pronunciations.)
19-year-old bad girl #1 who did worse in school: “We ain’t got nothin’ to do this mornin’. How about Tawny and me go to Rochester with you?” (Notice that she says “ain’t got nothin” and also makes a subject/object pronoun error with “me”, which a mod fixed and I had to request to be unfixed. 😁)
Elderly New England man: “Anythin’ else, miss? Want some tonic? Doctah Peppah, Frescer, Moxie…”
Canadian guy: “I came over to air things out before you arrived. Soary aboot that.” (Note: he also uses Canadian words like washroom instead of the American bathroom.)
American gal making fun of his accent: “Well, soary to surprise you. I wrapped everything up a day early.”
.
Of course, some of these will become caricatures if I don't keep the dialogue quirks reined in; I usually have to go back and remove a few instances of soary/oot/aboot from the Canadian dialogue. But, to wrap up this post that I've probably spent 45 minutes composing, if your characters are actually people with personalities and not just Male Character #1—I think I'll call him Brad and make him tall—and Female Characters #1 & #2—I think I'll call them Kayla and Maddie and maybe one of them is blonde—then your dialogue can follow naturally from who your characters really are.