Using a representative sample of Milky Way (MW)–like galaxies from the TNG50 cosmological simulation, we investigate physical processes driving the formation of galactic disks. A disk forms as a result of the interplay between inflow and outflow carrying angular momentum in and out of the galaxy. Interestingly, the inflow and outflow have remarkably similar distributions of angular momentum, suggesting an exchange of angular momentum and/or outflow recycling, leading to continuous feeding of prealigned material from the corotating circumgalactic medium. We show that the disk formation in TNG50 is correlated with stellar bulge formation, in qualitative agreement with a recent theoretical model of disk formation facilitated by steep gravitational potentials. Disk formation is also correlated with the formation of a hot circumgalactic halo with around half of the inflow occurring at subsonic and transonic velocities corresponding to Mach numbers of ≲2. In the context of recent theoretical works connecting disk settling and hot halo formation, our results imply that the subsonic part of the inflow may settle into a disk while the remaining supersonic inflow will perturb this disk via the chaotic cold accretion. We find that disks tend to form when the host halos become more massive than ∼(1–2) × 1011 M ⊙, consistent with previous theoretical findings and observational estimates of the predisk protogalaxy remnant in the MW. Our results do not prove that either corotating outflow recycling, gravitational potential steepening, or hot halo formation cause disk formation, but they show that all these processes occur concurrently and may play an important role in disk growth.