The ending turns on one decision: Buck stays in the lost world because Rudy survives the fall. When Rudy's roar echoes up after the cliff fight, the herd realizes the danger is not over, and Buck chooses to stay below and keep him in check instead of going home. He blocks the way to the lost world, and the others return to the surface.
In my opinion, this is the most generous thing the film does for its newest character. Buck is invited into the herd, which would have been the neat, expected finish, yet he gives up the offer to protect the family he has only just met. It could be argued that this fits the film's theme: Manny and Ellie welcome Peaches, Sid lets go of his adopted dinosaur brood, and Buck accepts a lonelier kind of duty.
The order of events matters. Rudy is knocked off the cliff, the herd celebrates, Sid says goodbye to the baby Tyrannosaurs, and Ellie gives birth, so the film lets everyone relax before the roar undercuts the victory. That is a different rhythm from Ice Age (2002), where the rescued baby is simply handed back to his people, and the tension ends once the delivery is made. Here the delivery of a baby is the happy ending, and the unfinished fight is the cost.
There is also a neat echo of the previous film. In Ice Age The Meltdown (2006), Manny worries that he may be the last mammoth alive, and the herd treks together toward a boat. Dawn of the Dinosaurs answers that worry with a daughter, and it turns the earlier trek into a descent into a jungle, with Lava Falls as the destination instead of an escape route. Carlos Saldanha directed both films, so the parallel reads as deliberate to me, though no source I have read says so.
Diego's choice matters too. After drifting away early on because he feels the herd has gone soft, he decides to stay with the herd after all, so the film closes the restlessness thread it opened in its first act. Sid gets a quieter resolution than either of them: he wanted a family, he found one in the wrong species, and he has to hand it back.
The story also leaves the door open, because the hidden dinosaur world and Buck are still down there. In the Disney+ spin-off Ice Age Buck Wild (2022), Buck rescues Crash and Eddie from raptors in the Lost World, which follows directly from the choice he makes here. The sequel Ice Age Continental Drift (2012) then opens with Peaches as a teenager clashing with her father, so the baby at the end of this film becomes a central family storyline. For where this fits in the bigger picture, see the Ice Age timeline.