Take into account that stars emerge from nebula, due to the nuclear fusion sun was born by generating a planetesimal, and then, planetesimal is formed and the planets appeared.
Then, the timeline is:
solar nebula - nuclear fusion - sun - planetesimal - planets