We present a chronology of the formation and early evolution of the Oort cloud by simulations. These simulations start with the Solar System being born with planets and asteroids in a stellar cluster orbiting the Galactic center. Upon ejection from its birth environment, we continue to follow the evolution of the Solar System while it navigates the Galaxy as an isolated planetary system. We conclude that the range in semi-major axis between 100au and several 10$^3$,au still bears the signatures of the Sun being born in a 1000MSun/pc$^3$ star cluster, and that most of the outer Oort cloud formed after the Solar System was ejected. The ejection of the Solar System, we argue, happened between 20Myr and 50Myr after its birth. Trailing and leading trails of asteroids and comets along the Suns orbit in the Galactic potential are the by-product of the formation of the Oort cloud. These arms are composed of material that became unbound from the Solar System when the Oort cloud formed. Today, the bulk of the material in the Oort cloud ($sim 70$%) originates from the region in the circumstellar disk that was located between $sim 15$,au and $sim 35$,au, near the current location of the ice giants and the Centaur family of asteroids. According to our simulations, this population is eradicated if the ice-giant planets are born in orbital resonance. Planet migration or chaotic orbital reorganization occurring while the Solar System is still a cluster member is, according to our model, inconsistent with the presence of the Oort cloud. About half the inner Oort cloud, between 100 and $10^4$,au, and a quarter of the material in the outer Oort cloud, $apgt 10^4$,au, could be non-native to the Solar System but was captured from free-floating debris in the cluster or from the circumstellar disk of other stars in the birth cluster.