The Quantumania ending closes one story and opens a bigger one: Kang is thrown into his own power core with a store of Pym Particles and apparently destroyed, Cassie opens the portal, and Scott and Hope return to Earth. Scott goes back to normal life but is uneasy about what Kang's defeat may mean, and the mid credits scene shows many Kang variants gathering to mourn him.
What does the unease mean? In my opinion, the film is admitting that it is a chapter rather than a finished story. The Kang who dies is only one of many versions across the multiverse, which is why the closing image is not a celebration.
Two smaller arcs give the ending its human weight. Janet's guilt matters because she helped Kang repair his timeline device before sabotaging it, so the family has a personal stake in his rise. Darren Cross matters because Cassie, rather than Scott, talks him out of his loyalty to Kang, and his death is the price. It could be argued that this is the film's best moment for Cassie, since it shows her acting as a hero without a suit.
Why did Quantumania underperform? The film took $476 million worldwide on a $200 million budget, according to Box Office Mojo and The Numbers, so it needed a very large total just to cover its cost. Perhaps the film was asked to do too much at once, as a family comedy, a Phase 5 opener and the introduction of a larger threat. That is a hedged reading rather than a proven cause.
If you want the smaller, heist driven tone of the first film, this is a different kind of movie. If you follow the multiverse storyline, the ending is the reason to watch. The next theatrical event in the saga is covered at Avengers: Doomsday.