to impose a payment on a wrongdoer as his penalty, or to be made to pay one
Almost every time this word appears, money changes hands. It belongs to Israel's courts, where a man who had done real damage to someone else was ordered to hand over a fixed sum, and the sum went to the person he had wronged rather than into any public treasury. Deuteronomy 22:19 even names the figure: a hundred pieces of silver, paid to the father of the girl the man had slandered. Proverbs 17:26 assumes the same practice from the other side, warning that making an innocent person pay is a wrong of its own.
From there the word reaches in two directions. A stronger power can lay a payment on a whole country, as Pharaoh Neco does to Judah in 2 Chronicles 36:3. And the payment can be one that nobody assessed: in Proverbs 22:3 the naive walk straight into trouble and pay for it. What holds these uses together is not a courtroom but a cost, since in each case someone ends up poorer for what he did.
Hebrew has a matching noun for the sum itself (עֹנֶשׁ), so the two divide the work neatly: this verb is the imposing, that noun is the amount owed. Notice also what the word does not mean. It is not correction aimed at improving a person, which is the business of words for training and discipline (יָסַר). Nobody here is being taught a lesson for his own good; a debt is being settled.