- Session 0 should establish what player actions are permitted (what kind of a campaign it is) and all players should get input (though the DM gets the final call of what she's prepared to actually run), so that there's 'buy in'. This includes PvP, whether it's okay to get into wider actions that may put the group in danger with the law, and so on. This isn't to deny player agency but to make it so that everyone understands what they're signing up for; one persons fun shouldn't be at the expense of everyone else's.
An accepted style of play in the campaign is something that should be clear from the start. The best games I have been in sort it out before session 1 and any new players get the rules when they join.
If everyone's happy with a lawless party and the consequences it will bring with it, there's no problem to solve.
- If "adventurers" are at all common in your world, the people in your world will already have learned to deal with the antisocial behavior they tend to bring with them (society will be wise to the classic 'murderhobo' scenario for example). Any society worth the name has preventative measures and consequences - likely harsh ones.
These facts should be made obvious to your players as soon as they begin; it doesn't have to be exposition -- it might be almost anything - a notice board of bounties for outlaws (which the players themselves can collect on) for a variety of crimes like murder, theft and so on, or a public execution of another adventuring group for murder (with the mage and the cleric bound and gagged at the very least).
That is, your players should know right from the very start that the society can and does actrespond to threats to life and property. If not stated before play begins it needs to be clearly demonstrated in the opening scene or scenes and reinforced frequently thereafter.
You need to figure out how the society or societies manage to enforce the law when faced with powerful adventurers in a way that fits your world, whether by overwhelming physical force or magical means etc.
- On the other hand, if you do have a degree of social breakdown with abundant lawless behavior - where the strong steal from or murder the weak - then the party should be the victim of such crimes any number of times before they have enough power to be perpetrators themselves; even if they succeed at stealing this or doing that, there's nearly always a bigger criminal who wants want they took or was connected to the person they killed.
Such societies tend to lead to gangs that enforce their will and don't tolerate encroachment on their territory (e.g. the mafia will act to protect the very shops they collect 'protection' from, making this protection at least worth something - after all you can't collect from people who have no money left). Their punishments of people who encroach on their turf tend to be even more onerous than those of a lawful society.