The first thing I do with a character is develop their voice. Everybody talks differently. Some people have accents. Choice of words, cadence and grammar use/abuse can immediately give readers an idea of who's who in dialogue.
I have a redneck character. He cusses out of hand like it's nobody's business. A lot of his dialogue/narration is comparing the new isekai world to something back home. Or making a metaphor/simile/idiom of some variety. He isn't excessively formal or eloquent.
I have a witch character. She reads lots of books and has lots of fancy ideas. Despite all of that, she's a social trainwreck, and doesn't have a lot of confidence. She wants to sound smarter or more well read than she really is but doesn't have the confidence to back it up.
If these two characters saw a third party making a mistake, they wouldn't point it out the same way.
Maybe our witch would say:
"Y-you really, made a bit of a- you're not doing that too well."
Maybe the redneck would instead say:
This can work for as many characters you can fit into a scene as you're comfortable with. It works best with highly contrasting voices.
When I'm writing dialogue, I try and play it back like a theater production. Characters exist and interact on whatever stage you put them on. You can even skip over having dialogue markers, he said, she said, if exposition/narration follows along naturally from what a character is saying. Not every verb associated with dialogue needs to be used with dialogue, language that describes broader actions can make just as much sense. I treat my characters like performers on a stage, they do stuff with their hands and bodies apart from flapping their lips.
Compare:
"Oh, y'all will just have to forgive me," Buck said, as he bowed his head in deferrence to the pastor.
To:
"It's no problem at all, child!" Friedrich must not have minded, after all, he came from a more provincial, less-ceremonial denomination.
Instead of writing just back and forth dialogue, set your characters up in a situation. People get interrupted. Maybe they're riding horses and their steed gets spooked. People can walk and talk. Having unbroken chunks of dialogue is just as boring as having unbroken exposition. Break up strict dialogue. One way I do it is by having viewpoint characters mentally summarize conversations. Your readers aren't going to pour over every word of dialogue for hidden meaning. Doubly so if it includes exposition. Dialogue is at it's best for dramatic purposes, not for expositing things for the reader. Anytime I feel like I have one character dumping exposition on another, I'll usually go back and reword it. Turn what may be two or three paragraphs of dialogue into one that's briefer.
Compare the following two examples
"Now see, what ya got with an internal combustion engine is a bunch of cylinders and pistons. And some pumps, a lot of tubes, and oil, too. We take some fun stuff called gasoline that's real flammable, and it comes from oil made of dead stuff, and we combust it up inside of these. So we got these cylinders and inside them is pistons, and you can think of it like... Churning butter, the piston moves up and down in the cylinder, with one end on a spinning shaft that moves all the power out. We spray the gasoline in the top part between the piston head and the cylinder, then we set it on fire with a little bit of uh, basically a little bit of lightning. Gasoline goes boom, turns into a gas and that expands, pushes down on the cylinder, that cylinder spins the shaft which goes to another piston and makes it all squeeze up, it repeats." Buck calmly explained the device for Alex.
"That sounds dangerous!" Alex balked at the idea. "And you had to use these things because nobody had come up with magic, or a spell engine or anything like that?"
"Well, yeah! Ya can get these things spinnin' up at thousands of times a minute. What's the alternative, ridin' a horse that does like, one thing a minute? But I'll tell ya what. One thing goes wrong on it, kablam! I had an uncle once, he worked on this car, we called them hot rods because they were... Hot, y'know, they got really hot and went really fast and usually uh, straight. Like a rod. Hence the name, I figure, of hot rod. Well he hot rodded his old Ford- Ford made engines and we used the engines in uh, metal wagons we called cars- and it went real fast. Right up until one of them pistons flew out and punched his clock in, he lost half his teeth and most of his brain." The man calmly recited the incident like it was nothing in the world.
Now compare:
"So we had these things called Internal combustion engines-" Buck explained in depth the strange devices he had a fixation on in his supposed old world. Great constructs of metal and oil, fueled by combusting fluids and using tremendous power and engineering to... Spin a metal shaft at extreme speed. It all sounded quite dangerous to Alex. Buck spoke of it with great excitement, about how specific mixtures of air and fuel made the best power, and the many potential uses of rapidly spinning metal poles. He talked at great length of their workings and how they could be used- completely nonmagically- to heat and cool the inside of metal wagons, to generate electricity to be harnessed by the vehicle's luxuries, and to spin the metal wheels up at blistering speeds. He made sure to tell Alex of how dangerous they were- how one of his uncles had been rendered stupid and mute by one engine exploding. Even that couldn't stop his excitement to talk about them. "-and that's the power of German engineerin'!"
The former is a very clear explanation of a car engine delivered by a redneck engineer. It's technically accurate. The latter is also an explanation of a car engine, but filtered through the mind of a woman that has never once had an inkling of what an internal combustion engine is.
It's still a dialogue, but if you're establishing characters and making sure they have distinct ways of communicating, then you can also take a few shorthands with actually WRITING dialogue. It's a bit of a cheat. I don't feel the least bit bad about using it.