The ending of Ant-Man 2015 settles three things: Darren Cross is gone, Scott Lang is free to be a father, and Hope van Dyne is set up to become a hero herself. Cross is destroyed when his suit collapses, and Lang survives by reaching the Quantum Realm and returning to normal size. Paxton covers for Lang, so he stays out of prison and can be with Cassie.
How does the finale work? Lang overrides his suit's regulator, shrinks past the point where Pym says no one has come back, and sabotages the Yellowjacket so that it shrinks out of control. In my opinion, this is the smartest choice in the film. The climax is set in Cassie's bedroom, with a toy train track standing in for a battlefield, and it turns the stakes into one small man trying to reach his daughter. Compare that with the Sokovia finale of Avengers: Age of Ultron, released just before it, where a city is lifted into the sky and the cost is counted in thousands. Here the cost is one family, and the film is better for knowing its size.
The ending also pays off the film's opening. In 1989 Pym quits S.H.I.E.L.D. and vows to keep his shrinking technology hidden, and the finale shows why: Cross was ready to sell the Yellowjacket to Hydra. It could be argued that Pym's secrecy fails twice, first through Cross and then through Lang's reckless choice, and Pym's warning about the Quantum Realm is the thread the later films pull. The Quantum Realm returns in Ant-Man and the Wasp, where Hope and Pym try to reach Janet, and again in Ant-Man and the Wasp: Quantumania.
The last story beat, in which Luis tells Lang that Sam Wilson is looking for him, links Lang to the wider Avengers story. The post credits scene then uses footage shot by the Russo brothers for Captain America: Civil War, so the teaser is built from the next film itself. Production context helps explain the tone: Kevin Feige has said Marvel worked on the project for eight years, and Edgar Wright kept screenplay and story credit after Peyton Reed took over as director. Perhaps that long development is why the ending feels like a small, finished heist rather than a setup for something bigger. Pym and Hope also grow closer, and the mid credits Wasp suit tells you where she goes next.