What is imprecatory prayer? What are the imprecatory psalms? Why does the Bible record people praying for absolutely terrible things to happen to their enemies?

Links:

What is imprecatory prayer? - https://www.gotquestions.org/imprecatory-prayer.html

What are the imprecatory psalms? - https://www.gotquestions.org/imprecatory-psalms.html

What does Psalm 137:9 mean when it says, “Happy is the one who seizes your infants and dashes them against the rocks”? - https://www.gotquestions.org/dashing-babies-against-rocks.html