From my understanding of general relativity, energy curves spacetime to produce an effect that we call gravity. The greater the concentration of energy, the greater the curvature and hence the greater the gravitational force we feel. However, I have repeatedly seen online that general relativity predicts that black holes have a 1D singularity of infinite density, which is an issue since the concept of infinitely small doesn't really exist physically.
What part of general relativity says that the singularity in a black hole must be infinitely dense? Why can't the explanation just be that the object has a sufficiently large mass to deform spacetime enough to produce an event horizon?