The ending closes Miles's origin story: he defeats Kingpin, destroys the collider, and takes on the role of his city's Spider-Man.
After the ending, Kingpin is caught in the collider blast, his allies are arrested, and Jefferson collects the evidence against them. The other Spider-people return to their own worlds, and Gwen finds a way to stay in touch with Miles from her dimension. That link, along with a sign that other Spider-heroes are out there, is how the film opens the door to more multiverse stories, and that door is why the series continued with Spider-Man: Across the Spider-Verse.
The sequence runs through specific scenes. Miles takes his leap of faith in his own homemade suit, the heroes break into Kingpin's lab, Peter B. stays behind to hold off the enemy, and Miles then sends the others home and destroys the collider. Each beat answers an earlier one: Spider-Man's flash drive in the subway tunnel is the object that finally shuts the machine down, and Jefferson, who supported Miles after Aaron's death, is the one who collects the evidence against Kingpin's allies.
Jordan Okafor's view: in my opinion, the key beat is the leap of faith, because it is where Miles stops borrowing from the older Spider-people and wears a suit he made himself. The choice to have Peter B. stay behind in Kingpin's lab matters too. He arrived as a worn out Peter Parker who only wanted to go home, and holding off the enemy so the others can reach the collider is the clearest sign that Miles's training worked on the teacher as well as the student. It could be argued that this makes Peter B. the emotional anchor of the final act, even though Miles takes the spotlight.
The ending also differs from the other Spider-Man films in how it handles closure. The Raimi, Webb and Marvel Cinematic Universe films each continue one hero's story inside their own universe, while this film sends its four visiting heroes back to separate worlds and leaves Gwen's link to Miles as the thread that carries into Across the Spider-Verse, the tenth film in release order. In my opinion, that makes the final image feel like the start of a shared story rather than a sequel hook.
Production context supports the look of those final scenes. According to Cartoon Brew's coverage, the film was mostly animated on 2s, with some shots on 1s and 3s, and facial lines were built as 3D geometry because the film was released in stereo. My reading is that the choice gives the climax a hand-drawn, comic-book texture even in its biggest set pieces.
Perhaps the ending works because it resolves Miles's personal story completely while leaving the wider multiverse deliberately open, which is harder to pull off than it looks.