Leaving too early
Yunus had been calling his people and they were not listening. He left — and the Quran describes it precisely: And mention the man of the fish, when he went off in anger and thought that We would not decree upon him (21:87).
He was not doing something wicked. He was tired of being ignored, and he went. The Quran treats that as the mistake, and it is a mistake a child understands immediately, because giving up on something hard when nobody seems to care is exactly what they are tempted to do.
The darkness
The ship, the lots, and the sea are given briefly in Surah as-Saffat: he ran to a laden ship, drew lots and was among the losers, and the fish swallowed him while he was blameworthy (37:139-142).
Then the verse everything turns on: And he called out within the darknesses: There is no deity except You; exalted are You. Indeed, I have been of the wrongdoers (21:87).
Look at what the du'a contains. It says who Allah is. It says Allah is above any fault. And then it says: I was wrong. There is no request in it at all — he does not ask to be let out.
The answer comes in the next verse: So We responded to him and saved him from the distress. And thus do We save the believers (21:88). And the Quran adds a line that changes the whole story: And had he not been of those who exalt Allah, he would have remained inside its belly until the Day they are resurrected (37:143-144). What saved him was what he had been doing all along.
The town that believed
Here is the part almost every retelling leaves out, and it is the best part. While he was gone, his people believed.
Then has there not been a city that believed so its faith benefited it except the people of Yunus? When they believed, We removed from them the punishment of disgrace in worldly life and gave them enjoyment for a time (10:98).
In all the stories a child has been through — Nuh, Hud, Salih, Lut, Shu'ayb — the people refuse. Yunus's people are the exception, the one town in the Quran that turned round in time. And he had already left.
He was brought out onto the open shore while he was ill, and a plant was made to grow over him (37:145-146). Then he was sent back, to a hundred thousand or more, and they believed (37:147-148).