1 - God will wipe the earth and Jerusalem clean of the wicked & those not seeking Him, for their sins
2 - God will judge and desolate His enemies in Ammon, Moab, Assyria, Ashkelon, and Israel will dwell peacefully there.
3 - Israel has also been wicked. She doesn't draw near to Me, breaks the law, and devour the poor. So I will judge the nations, and change and restore Israel to holiness. Sing, Israel, for God will save and sing over you!
How this is about Jesus
He asks for the nations as His inheritance from His Father, when He is crowned King (Psalm 2). Here we see some of those nations judged.
He sings over the apostles in the Upper Room, just before the cross, fulfilling Zeph. 3:17.
When God judges the nations, He usually includes an indictment on His own people. We have no reason to boast or gloat when we criticize the culture for its godlessness, for we are sinners ourselves (Romans 2). But God in His grace has chosen to restore and forgive us.