When I'm writing dialogue, I have a problem figuring out what is the appropriate thing to say in the conversation. Could you please help?
Dialogue consists of two characters trying to get something from each other. Each has a desire that they want the other to fulfill. Each has some reluctance in fulfilling that desire, or else has difficulty figuring out what that desire is because the other is not, for one reason or another, stating it clearly. They may be ashamed of their desire, they may be afraid of rejection, they may be attempting to deceive. But they want something, and they are choosing their words, in a way that is consistent with their character, to try to get the other person to grant their desire.
The is true of both people in the conversation, so every passage of dialogue is like a game of chess: move and countermove, each person attempting to increase their chances of winning.
If you don't know what to have a character say next, it is because you have not thought through what they are trying to get from the other person, or what the other person is trying to get from them, and why they are reluctant to grant it. Figure those things out and the next line of dialogue will be obvious.
While dialog is often used to resolve a conflict of interests between two or more characters, it is not the only purpose it can serve; it can also be used to establish your settings (the notorious maid-and-butler/as-you-know trope comes to mind instantly, but when executed tastefully, a dialogue can provide you with a fast and compact way to avoid lengthy chunks of description, serving the reader only bits of information which are immediately needed).
The way your characters talk is may (or even should) be telling (or, showing, rather...). People, who know each other well, often finish each other sentences. People who are just introduced might want to impress each other with their eloquency, and some people start their sentences with "I mean" without, like, saying anything before that which might, like, require, like, clarification, or something.
Figure out your conflict, figure out the settings, decide who is talking, and type away.
One thing to avoid for sure: small talk. Unless you greeting bears an important meaning ("Ave, Imperator, morituri te salutant"), all hi's and how-do-you-do's are just garbage whith pollutes the narration.
Read a lot. Pay attention to how your favorite authors present dialog.
You might find that written dialog doesn't include everything everyone says from when they meet to when they part. It starts when the important stuff begins and ends when it ends. It leaves out all the hellos and how are you's, as well as the I really should be goings and goodbyes.
Limiting yourself to the meaningful, important, interesting bits of conversations might help you get through them.