The Buddha shares the three bases for meritorious action - 1) through generosity, 2) through virtuous conduct, and 3) through meditation.

Puññakiriyavatthu sutta - Basis For Meritorious Action

This was said by the Blessed One, said by the Arahant, as I have heard:

"Bhikkhus, there are these three bases for meritorious action. What are the three? The base for meritorious action through generosity, the base for meritorious action through virtuous conduct, and the base for meritorious action through meditation. These, bhikkhus, are the three bases for meritorious action."

The Blessed One spoke on this matter. In this regard, it is said:

"One should train only in merit, which brings long-lasting happiness; Cultivate generosity, virtuous conduct, and develop a mind of loving-kindness.
Having developed these qualities, the three causes of happiness; The wise one re-arises, in a non-afflictive and pleasant world."

This matter too was spoken by the Blessed One, as I have heard.