Sammasā Sutta
Among the Kurū near kammāsadhamma.
The Blessed One asked the monks if they carried out an inward investigation. One monk said that he did (he contemplated the 32 body parts). The Buddha was not satisfied with his answer. Ānanda asked him to explain how to carry out an inward investigation.
The Buddha taught the monks to reflect that aging and death came about through the acquisition of the five aggregates. The five aggregates come about due to craving. Craving arises due to feeling, feeling arises due to delightful sense objects. S.ii.107 f.