In which text first time "Gautama leaving Yashodhara for searching truth" story is written? In which text first time "Gautama leaving Yashodhara for searching truth" story is found to be written?
 This text was written how many years after death of Buddha?
See also Which suttas in the Pali canon are relatively early or late? -- I'm not sure we know the sequence in which suttas were written -- so we can't say for sure which time is &quot;the first time&quot;, though some people guess or assess via textual analysis that some bits might be later or altered somehow -- and/or maybe all suttas were written at the same time (i.e. at the 4th council).
If they were first time recorded in fourth council, then https://en.wikipedia.org/wiki/Fourth_Buddhist_council says it happenned in 1st century BC. And Gautama was in fourth century BC. So can we deduce that first time, it was recorded 200-300 years after him?
I think we're meant to understand that the suttas were remembered when they were first spoken (e.g. spoken by Gautama) ... and &quot;recorded&quot; in the First Council (&quot;a gathering of senior monks of the Buddhist order convened just after Gautama Buddha's death in ca. 400 BC&quot;).
By &quot;recorded&quot;, I mean that they agreed on what to memorise, what to consider as &quot;canon&quot;.
They were later written in the Fourth Council:

The council was held in response to a year in which the harvests in Sri Lanka were particularly poor and many Buddhist monks subsequently died of starvation. Because the Pāli Canon was at that time oral literature maintained in several recensions by dhammabhāṇakas (dharma reciters), the surviving monks recognized the danger of not writing it down so that even if some of the monks whose duty it was to study and remember parts of the Canon for later generations died, the teachings would not be lost.

I don't know in which texts &quot;Yashodhara&quot; (or Yasodhara) is mentioned by name -- there are some References in her Wikipedia article.
One the sources (the main source?) of the detailed story of Gautama from before his &quot;noble search&quot; started (i.e. the story with details of his leaving his wife) is in the introduction to the Jataka tales (e.g. here) -- perhaps she isn't mentioned by name though, though his son (named &quot;Rahula&quot;) is:

Within the chamber was burning a lamp fed with sweet-smelling oil, and the mother of Râhula lay sleeping on a couch strewn deep with jasmine and other flowers, her hand resting on the head of her son. When the Future Buddha reached the threshold, he paused, and gazed at the two from where he stood.
&quot;If I were to raise my wife's hand from off the child's head, and take him up, she would awake, and thus prevent my departure. I will first become a Buddha, and then come back and see my son.&quot; So saying, he descended from the palace.

I'm not sure what the provenance is of the Jataka Tales. They're included in the Khuddaka Nikāya of the Sutta Pitaka but somehow not exactly suttas (I'm not sure whether or when the Buddhist councils were involved with them).