Old Testament readings use the Septuagint , the Scripture the apostles quoted. Masoretic numbering shown for reference.Learn why
LXX

Deuteronomy 21:23

his body shall not remain all night upon the tree, but ye shall by all means bury it in that day; for every one that is hanged on a tree is cursed of God; and ye shall by no means defile the land which the Lord thy God gives thee for an inheritance.

Read in other translations