to deal out to someone what an act has earned: to repay, reward, or requite, whether good or ill
This is the word's largest and most far-reaching use, and it drives most of the Bible's theology of reward and consequence. To do this is to bring a completed act back around onto the person who did it, so that a deed and its return belong to one moral arc. The same word covers both directions: dealing kindly and generously with someone, and paying back an offense in full measure.
Because it can swing either way, the direction is usually fixed by what surrounds it. When God is the one dealing bountifully with a person, it is overflowing generosity ("the LORD has dealt bountifully with you"). Yet the very same phrasing, turned negative, becomes the strongest statement in the Psalms that God does not simply pay us back what we have earned: "he has not dealt with us according to our sins." Turned toward an enemy, it names strict, measured payback.
The Hebrew often pairs the verb with its matching noun for effect, so that the crime and the punishment are named with the same word, making the fairness of the return visible in the very wording. Israel's wisdom writings apply the same logic to daily life: a kind person does good to his own soul, and a good wife deals well and never ill with her husband. Underneath every use is a settled conviction that acts come due, and that God is the one who sees them through to their fitting end.