Homer prepares the audience for the death and destruction that occurs in Odyssey 22 in a couple of instances in Books 17-20.
Early in Book 17, Theoclymenus predicts that Odysseus is already nearby, is learning of the unjust behavior of the suitors, and his preparing to take vengeance on them.
Also in Book 17, when Melanthius tries to knock Odysseus from the path, Eumaeus prays for the return of Odysseus and punishment for Melanthius. Indeed, both those prayers are eventually answered.
In Odyssey 18, Odysseus, disguised as a beggar warns Amphinomus that Odysseus is near and that he will punish the suitors:
I tell you, he is near, and may some god prompt you homewards, so you need not face him on his return. He and the Suitors will not part without bloodshed, I think, once he is under his own roof. (A.S. Kline translation)
In Odyssey 19, Penelope has a dream about an eagle that kills 20 geese. The disguised Odysseus, who is listening to Penelope relate this dream, tells her that it is clearly a prediction that Odysseus is going to destroy the suitors.
Finally, in Book 20, we hear that Zeus thunders when the sky is completely clear and that one of the servant women, upon hearing this, prays for the final day of the Suitors in the palace:
It must be an omen you send someone. Make even my words come true. Today let the Suitors delight in feasting for the very last time in Odysseus’ palace. Let those who have bowed my limbs in hard labour grinding barley, now eat their last meal.’ (A.S. Kline translation)