It's the 8th Amendment of the Constitution.
Of which there remain many unsettled questions on what constitutes “cruel and unusual.” I.E, do we use the original 1791 standard? Contemporary public opinion? Something else?
Not to mention punishment that is proportionate to the crime. Such as, what type of justice shall be meted out on a criminal who commits a particularly cruel and unusual crime?
The cruel/unusual standard was added initially as a sat against government instituting crime and unilaterally applying coercion and torture to extract “confessions” arbitrarily.
The liberal SCOTUS flared this debate when abolishing capital punishment in the 1970s. The pieces of that debate have never been put together again. Which is why states have different statutes on the books, yet are restrained in what they may do.