Punishing somebody is a terrible way to get what I want
To start with, a punishment implies that somebody is wrong, or bad, or evil and is meant to correct the situation so it doesn't happen again. It tries to make them suffer enough to see the error in their ways and change them. But since the change is not coming from within, the other person is just as likely to feel resentment and hostility and reinforce the exact behavior that I'm trying to change.
Instead of punishment, understand the needs behind what caused them to take the action in the first place.