In the ending of Tomorrow Never Dies, James Bond and Wai Lin destroy Elliot Carver's stealth ship, Bond kills Carver with his own drilling device, and the war between Britain and China is avoided. Spoilers follow.
Bond stops the missile before it can start a war, and Stamper dies when the missile detonates. Bond and Wai Lin survive in the wreckage and share a kiss while a British navy ship searches for them.
The neatest touch is that Carver is undone by a tool of his own. His drilling device is the weapon that kills him, which suits a character whose whole scheme was built on machinery pointed at the wrong target, and it makes the finish feel like a consequence rather than a rescue.
Stamper's death follows the same logic. Bond traps Stamper, Carver's enforcer, in the missile's mechanism, so the machine meant to start a war is what kills the man who guarded it. Earlier on the ship, Carver has already shown how he treats his own people: he kills his hacker, Henry Gupta, the moment Gupta is no longer useful. A villain who discards allies that casually has no one left beside him when the stealth ship starts to burn.
The stakes also loop back to the opening. The film begins with a British warship lost and London close to sending its fleet against China. It ends with a British navy ship searching the wreckage for Bond and Wai Lin, so the same navy that nearly sailed to war is now looking for survivors. The missile was aimed at Beijing to kill much of the Chinese government, which means the final act is a race to stop a launch rather than a duel.
The pairing matters too. Wai Lin is a state security agent who tracked the same events, so she is a partner in the final stretch rather than someone Bond saves, and the closing image leaves the two as partners who earned each other's respect. In my opinion, that makes the film's closing partnership closer to The Spy Who Loved Me, where Bond also works alongside an agent from another country's service, than to the lone-hero finales of earlier entries.
In my view, it also marks a difference from GoldenEye, the previous film in release order: here the threat is a media company manufacturing a war for broadcast rights, and the ending resolves it by physically stopping the missile and the man behind it, not by exposing him to the public.