Generally, the brain responds better to positive reinforcement rather than punishment.

Examples

Effective animal training is based on this principle.

Example from TAP - trigger action pattern: If you notice that you missed a trigger, don't punish yourself for the failure. Instead, reward yourself for the belated noticing!