The central twist of "Spider-Man: Across the Spider-Verse" is the revelation that Miles Morales is the "original anomaly." The radioactive spider that bit him was not from his universe (Earth-1610) but from another, Earth-42. It was brought to his dimension by The Spot when he was a scientist at Alchemax. This means Miles was never supposed to become Spider-Man, and his existence disrupts the multiversal canon that Miguel O'Hara is desperately trying to protect.
This revelation re-contextualizes the entire film. Miguel's hostility towards Miles is not just about his rebellious attitude; it's because he views Miles as the root of the multiverse's instability. This leads to the film's second major twist in the final act. When Miles attempts to use the Spider Society's teleporter to go home, the machine, which reads the genetic origin of the spider's bite, sends him not to Earth-1610, but to the spider's home of Earth-42.
On Earth-42, Miles discovers a grim, darker version of Brooklyn. Because the spider bit him, Earth-42 never got a Spider-Man. In this reality, his father, Jefferson Davis, is dead, and his Uncle Aaron is still alive. The final, shocking reveal is that the Miles Morales of Earth-42 has become the Prowler. The film ends on this massive cliffhanger, with Miles-1610 captured by his alternate-universe uncle and cousin, while Gwen Stacy assembles a new team of Spider-Friends (including Peter B. Parker, Spider-Ham, Spider-Man Noir, Peni Parker, Spider-Punk, and Spider-Byte) to rescue him.