He was speaking in the context of relationships, but works in life generally

Do not punish behavior that you wish to see repeated.

~ Jordan Peterson