The ending of Resident Evil 2002 means the outbreak has escaped the Hive, and Umbrella now has both Alice and the infected Matt in its hands. Umbrella's team takes them into custody back at the mansion, where Matt's wound is already mutating him and he is slated for the Nemesis Program. Alice later wakes strapped to a table in Raccoon City Hospital and breaks free. Outside she finds the city wrecked and empty and takes a shotgun from an abandoned police car. A newspaper headline about horror in Raccoon City confirms the virus has spread.
In my opinion, the final minutes are the film's smartest move, because the claustrophobic Hive story gives way to an open street with no one in it. Up to that point the film is a closed system: one mansion, one train, one computer, and a corridor where the Red Queen's laser grid kills One and several soldiers in a single sequence. Paul W. S. Anderson, the only credited screenwriter, keeps every set piece inside the Hive's rules. Shut the Red Queen down and every door opens, which is exactly what Kaplan does, and the zombies and mutated creatures pour out. The hospital scene breaks that rule on purpose, and it tells the audience the next film will be bigger. Resident Evil: Apocalypse delivers on it, opening with Alice and Matt Addison escaping the Hive only to be recaptured, then moving the outbreak into Raccoon City itself.
The ending also sets a pattern the saga keeps repeating, which is Alice waking up somewhere she does not understand. She starts the first film with no memory in a bathroom, she ends it on a hospital table, and Resident Evil: Retribution later puts her in a suburban kitchen as a housewife. Perhaps that is the saga's most reliable trick, and this film is where it started.
The Hive itself is worth tracking too. Resident Evil: The Final Chapter sends Alice back to the Hive beneath Raccoon City, with the Red Queen played by Ever Anderson as Young Alicia / Red Queen, so the lab from this film becomes the series' last destination. Several faces come back along the way: Michelle Rodriguez as Rain and Colin Salmon as One both appear in Retribution, which is how the saga gets around the fact that both characters die in 2002.
Is the film canon? It is the first film of the main saga, which continues through Resident Evil: Extinction and ends with Resident Evil: The Final Chapter. The 2021 reboot, Resident Evil: Welcome to Raccoon City, starts again in 1998 with game characters such as Claire Redfield and Leon Kennedy, and Resident Evil (2026) is Zach Cregger's separate take. So, the 1998 setting belongs to the reboot, not to Alice's story. Alice herself was created for the films and is not in the games, while TMDB credits Shinji Mikami for the original story. For how the screen versions differ from the source, see Resident Evil games vs movies, and for the whole sequence see the Resident Evil timeline.