There are many synonyms for the phrase "exact punishment from" that can be used to add variety and nuance to your writing. Some options might include "impose retribution upon," "enforce penalties for," "inflict consequences upon," "impart due justice for," and "enact appropriate sanctions against." Each of these phrases brings a slightly different perspective to the idea of punishing someone in a way that fits their actions. Using synonyms like these can help to make your writing more engaging, and to ensure that you are communicating your message in the most effective way possible.