Hello!
When you use the phrase: “deal with” it is usually referring to an annoying situation that you don’t want to be in.
Example:
Sarah is gossiping behind Ana’s back. Ana soon realizes that Sarah is gossiping about her because Ana’s friend, Brian, tells her. Brian then asks Ana if she wants to confront Sarah about her behavior. Ana responds with, “No, I would rather not deal with her.”
When you use the phrase: “sort out” it is usually referring to a situation where you want to understand the cause of the problem and fix it.
Example:
Ana gets in a fight with Brain, her friend, because of a misunderstanding. Ana, being very upset, goes to her mom and tells her about the fight between her and Brian. Her mom then tells her that she should consider sorting out the misunderstanding between her and Brian. Ana agrees and speaks to Brian about the fight they had; they listen to each other’s side of the story and sort out their issues with one another. Brian and Ana hug and go back to their friendly relationship.
(I hope this helps; let me know if you have any questions)