No, a black hole does not collapse as soon as it forms. When a black hole forms, it is a result of the gravitational collapse of a massive object, such as a star, under its own gravity. As matter collapses under extreme gravitational forces, it becomes infinitely dense, creating what is known as a singularity at the center of the black hole.
Near the event horizon of a black hole, where the gravitational pull is incredibly strong, time dilation occurs. Time appears to slow down for an outside observer as they approach the event horizon. However, this does not mean that the black hole itself collapses instantaneously.
From the perspective of an outside observer, it would take an infinite amount of time for an object to cross the event horizon and reach the singularity. This is because time dilation becomes more severe the closer you get to the event horizon. As a result, the outside observer would never witness the actual collapse of the black hole.
However, from the perspective of an object falling into the black hole, it would experience a finite amount of time before reaching the singularity. For that object, the collapse would happen relatively quickly.
It's important to note that our understanding of black holes is based on current theories and models of gravity, such as general relativity. At the singularity within a black hole, the laws of physics as we currently understand them break down, and a theory of quantum gravity may be needed to describe the true nature of black hole singularities.