Hi doodoot ,
Here I think I manage to find out the sutta .
SA 287
The Ancient way of the noble one
https://suttacentral.net/sa287/en/choong
thus have i heard.
At one time, the Buddha was staying at Jetavana, Anāthapiṇḍika’s park at Śrāvastī.
Then, the World-Honoured One said to the monks: “I recollect that once, before I had attained the highest enlightenment, when alone in a quiet place, concentrated energetically on meditation, I had this thought:
“Because of the existence of what dharma (nature of phenomena), do aging-and-death come to be? Conditioned by what dharma, do aging-and-death come to be?
“Then, rightly thinking, I came to grasp the nature of phenomena as they really are, directly: Because birth exists, aging-and-death exist; conditioned by birth, aging-and-death exist; and similarly for becoming, attachment, craving, feeling, contact, the six sense-spheres, name-and-material form.
“Because of the existence of what dharma do name-and-material form exist? Conditioned by what dharma do name-and-material form come to be?
...........................................................................
https://suttacentral.net/sn12.65/en/bodhi
SN 12.65
The City
At Savatthī. “Bhikkhus, before my enlightenment, while I was still a bodhisatta, not yet fully enlightened, it occurred to me: ‘Alas, this world has fallen into trouble, in that it is born, ages, and dies, it passes away and is reborn, yet it does not understand the escape from this suffering headed by aging-and-death. When now will an escape be discerned from this suffering headed by aging-and-death?’
“Then, bhikkhus, it occurred to me: ‘When what exists does aging-and-death come to be? By what is aging-and-death conditioned? ’ Then, bhikkhus, through careful attention, there took place in me a breakthrough by wisdom: ‘When there is birth, aging-and-death comes to be; aging-and-death has birth as its condition.’
“Then, bhikkhus, it occurred to me: ‘When what exists does birth come to be?… existence?… clinging?… craving?… feeling?… contact?… the six sense bases?… name-and-form? By what is name-and-form conditioned?’ Then, bhikkhus, through careful attention, there took place in me a breakthrough by wisdom: ‘When there is consciousness, name-and-form comes to be; name-and-form has consciousness as its condition.’
“Then, bhikkhus, it occurred to me: ‘When what exists does consciousness come to be? By what is consciousness conditioned? ’ Then, bhikkhus, through careful attention, there took place in me a breakthrough by wisdom: ‘When there is name-and-form, consciousness comes to be; consciousness has name-and-form as its condition.’
~~~~~~~~~~~~~~~~~~~~~
“Then, bhikkhus, it occurred to me: ‘I have discovered this path to enlightenment, that is, with the cessation of name-and-form comes cessation of consciousness; with the cessation of consciousness comes cessation of name-and-form; with the cessation of name-and-form, cessation of the six sense bases; with the cessation of the six sense bases, cessation of contact…. Such is the cessation of this whole mass of suffering.’