Christ ransomed us from the curse of the law by becoming a curse for us, for it is written, Cursed be everyone who hangs on a tree, that the blessing of Abraham might be extended to the Gentiles through Christ Jesus, so that we might receive the promise of the Spirit through faith. (Gal 3:7-14)
https://bible.usccb.org/bible/readings/101124.cfm
He became a curse for us. As the Church has always proclaimed: “He died for all!” And as the old hymn invites us to sing, “What Wondrous Love is This!”