Creating merit is part of creating new karma. Basically the idea is to change the whole structure of ones personality. For example becoming less selfish or less self centered or more tolerant, etc. One becomes a different person. That is the merit aspect and the wisdom aspect is to understand the nature of the self. What the self is. To realize that the self is not an immutable unchanging psychic principle but it is a structure formed by many kinds of psychic elements all clustered together. That is what forms this notion of the self. So that is the wisdom aspect. The merit aspect comes from the change in the person. How the person behaves, relates to the world and the wisdom aspect has to do with perception , how one sees oneself and how one perceives the world.
— Traleg Kyabgon Rinpoche