The cream cheese went in straight from the fridge
Very commonCream cheese is firm at fridge temperature and softens considerably at room temperature. Cold, it breaks into lumps that the liquid ingredients cannot dissolve, and the natural response — beating for longer and faster — folds air into the batter rather than smoothing it. So the same mistake produces both faults at once: a lumpy texture and an aerated batter that will rise and then sink.
What to change
Bring the eggs and liquid to room temperature first
Let eggs and any milk sit out before starting, and add the eggs a little at a time rather than all at once. If the mixture does begin to curdle, a spoonful of the measured flour beaten in usually brings it back. A split batter can be baked and will give a coarser, denser cake.
Any creamed cake. Irrelevant to melted-fat and all-in-one methods, where there is no emulsion to break.
Trade-off: Requires planning an hour ahead, which is the commonest reason it is skipped.