In the OT, we also see that someone who was hung on a tree was under God’s curse:
Deut 21:22-23 If a man guilty of a capital offense is put to death and his body is hung on a tree, you must not leave his body on the tree overnight. Be sure to bury him that same day, because anyone who is hung on a tree is under God’s curse.
But in the NT we see that Jesus was “hung on a tree” when he was crucified and thus became cursed of God. He took away our curse by becoming a curse for us.
Gal 3:13 Christ redeemed us from the curse of the law by becoming a curse for us, for it is written: “Cursed is everyone who is hung on a tree.”