Great question! Leaves are a key part of the map that every plant (and animal) stores inside every cell.
The plant can't grow without leaves and so they are pretty much the first thing to emerge from a seed.
If we think about an oak tree say, it produces seeds (acorns) - that are made up of cells, that all contain this plan which says which cells should do what - which are leaf cells, wood cells, root cells, and so on. When the acorn drops, hopefully, it gets picked up, taken away, and buried by a bird or a squirrel. Then, as the acorn gets warmed by the sun, and wet due to rain, this stimulates chemical signals that set off the cells dividing inside and they start forming the tree organs that they've been told to by the plan in every cell.
The first things that form are a tiny root (to get water and nutrients), and the stem and leaf cells. These cells then rapidly divide and divide, letting the stem push up and out of the soil towards the light. Once cells in the stem sense light, the tiny curled up leaves get the signal to open.
The leaves are full of a substance called chlorophyll - this makes them green but it's also what absorbs energy from the sun, turning it into sugar (food). The oak can then grow more stem, more root, and more leaves and the process goes on until the tree gets large, if it's lucky! The movie below shows this process.