Many different forms of punishment have been invented and used throughout human history. However, they are not all equally moral.

Imprisonment

Never use. See my article for details.

Pain

From a theorical perspective, this is the ideal method (for reasons discussed in the article on imprisonment). Another upside is that it's a feasible option in a lot of situations where these other methods aren't. Pain can be used in almost any situation where the criminal is someone you have non-digital social circle intersection with. It has a drawback though: it doesn't make restitution to the victim. For that reason, when there is a victim, it's preferable to use something like forced labor (see below) if possible.

Forced labor

Although forcing labor out of a criminal can require containing them, this method is kind of the opposite of imprisonment in two important ways. First, it forces the criminal to make restitution, rather than sitting in a cage all day doing nothing and eating food bought with taxpayer money. Also, and more importantly, it reverses the moral backwardness of imprisonment, because instead of punishing the virtue of Uncontability, it rewards the virtue of Diligence. The biggest downside of this method is the low practicality factor: forcing labor out of a criminal generally requires the punisher to be in a position of power similar to a government.

Taking of property

This one is very similar to forced labor, and is a lot more practical. It's also the easiest one to do in secret, avoiding any retaliation. So what's the downside? Well, depending on the criminal, collateral damage. If the criminal has a family, the rest of them will probably feel the impact just as much, or even entirely instead of the criminal (for example if the criminal is a child and their parents will just replace whatever you took from them). That's unacceptable. There's also the downside that it doesn't force the virtue of Diligence out of the criminal, so it doesn't have the same spiritual effect as forced labor.

Death

This one is unique in that it can't scale at all. It has a fixed magnitude. The real downside though is that we don't actually know what happens to people who die. We know they aren't their bodies, so it's presumably that they continue to exist in some form. But what they experience after it is anybody's guess - maybe the afterlife is better than this life! We just can't know. That's why we should avoid using death as a punishment when possible. However, it has some upsides practicality-wise. It prevents any possibility of the criminal retaliating, and is relatively easy to do anonymously.

Ostracism

Not much of a punishment as it doesn't actively hurt the criminal, but this one has some upsides practicality-wise. It will almost never be counter-punished, so it's well suited to situations where the criminal holds so much power that trying to really get back at them will just get you hurt as well.