This teaching is from The Way to a Fortunate Rebirth section from "In the Buddha's Words" by Bhikkhu Bodhi
Grounds for Making Merit
Puññakiriyavatthusutta—Bhikkhu Sujato
The good deeds of giving, ethics, and meditation lead to good rebirths, depending on the level to which they are developed.
“Mendicants, there are these three grounds for making merit. What three? Giving, ethical conduct, and meditation are all grounds for making merit.
First, someone has practiced a little giving and ethical conduct as grounds for making merit, but they haven’t got as far as meditation as a ground for making merit. When their body breaks up, after death, they’re reborn among disadvantaged humans.
Next, someone has practiced a moderate amount of giving and ethical conduct as grounds for making merit, but they haven’t got as far as meditation as a ground for making merit. When their body breaks up, after death, they’re reborn among well-off humans.
Next, someone has practiced a lot of giving and ethical conduct as grounds for making merit, but they haven’t got as far as meditation as a ground for making merit. When their body breaks up, after death, they’re reborn in the company of the Gods of the Four Great Kings. There, the Four Great Kings themselves have practiced giving and ethical conduct as grounds for making merit to a greater degree than the other gods. So they surpass them in ten respects: divine life span, beauty, happiness, glory, sovereignty, sights, sounds, smells, tastes, and touches.
Next, someone has practiced a lot of giving and ethical conduct as grounds for making merit, but they haven’t got as far as meditation as a ground for making merit. When their body breaks up, after death, they’re reborn in the company of the Gods of the Thirty-Three. There, Sakka, lord of gods, has practiced giving and ethical conduct as grounds for making merit to a greater degree than the other gods. So he surpasses them in ten respects …
Next, someone has practiced a lot of giving and ethical conduct as grounds for making merit, but they haven’t got as far as meditation as a ground for making merit. When their body breaks up, after death, they’re reborn in the company of the Gods of Yama. There, the god Suyāma has practiced giving and ethical conduct as grounds for making merit to a greater degree than the other gods. So he surpasses them in ten respects …
Next, someone has practiced a lot of giving and ethical conduct as grounds for making merit, but they haven’t got as far as meditation as a ground for making merit. When their body breaks up, after death, they’re reborn in the company of the Joyful Gods. There, the god Santusita has practiced giving and ethical conduct as grounds for making merit to a greater degree than the other gods. So he surpasses them in ten respects …
Next, someone has practiced a lot of giving and ethical conduct as grounds for making merit, but they haven’t got as far as meditation as a ground for making merit. When their body breaks up, after death, they’re reborn in the company of the Gods Who Love to Create. There, the god Sunimmita has practiced giving and ethical conduct as grounds for making merit to a greater degree than the other gods. So he surpasses them in ten respects …
Next, someone has practiced a lot of giving and ethical conduct as grounds for making merit, but they haven’t got as far as meditation as a ground for making merit. When their body breaks up, after death, they’re reborn in the company of the Gods Who Control the Creations of Others. There, the god Vasavattī has practiced giving and ethical conduct as grounds for making merit to a greater degree than the other gods. So he surpasses them in ten respects: divine life span, beauty, happiness, glory, sovereignty, sights, sounds, smells, tastes, and touches.
These are the three grounds for making merit.”
The Buddha is sharing here on rebirth. It is ideal to actively reflect and independently verify the Buddha's teachings rather than blindly believing or disbelieving them. The topics of rebirth and kamma (merit) may not be as obvious to verify them with certainty. In such a case, it is healthy to see them as views the Buddha shares the one has yet to verify. It is possible to get all the way to enlightenment without having verified these topics by oneself, so one should continue practice even if they're not able to readily verify. The Buddha shares these teachings so that if one directly experiences either of these aspects, they can maintain steadiness of mind knowing that what they're experiencing is the truth and what the Buddha has already shared.
See https://suttacentral.net/an8-danavagga for further teachings on giving.
Related teachings:
I see... thanks for this feedback