A lot of the times we would just do nothing. Marijuana possession doesn't need punishment for example.
Otherwise there are a tonne of options from before prison became the norm. Community service, restitution, fines, public shaming, exile, corporal punishment, capital punishment. Some more acceptable today than others.