How do you write realistic dialogue?
You let your characters speak for themselves. Let them carry on conversations as if you weren’t around to monitor and correct them. That means that sometimes they won’t speak correctly. In fact, it’s more than possible that they’ll seldom speak correctly because few real people do.
When they’ve had their say, then you go over what they said and delete all the extraneous words, and if they talk like most people, there will be a lot of extra words crossed out when you’re done.
When you’ve slimmed down the conversation to the point where eliminating any more words will change the meaning of the exchange, then you’re done.