The Iron Giant sounds like it fits
Set during the Cold War in 1957, the film is about a young boy named Hogarth Hughes, who discovers a giant metallic robot who fell from space. With the help of beatnik artist Dean McCoppin, they attempt to prevent the U.S. military and Kent Mansley, a paranoid federal agent, from finding and destroying the Giant.
The movie ends with the robot sacrificing himself to stop a nuclear missle launched to destroy him, and his last word is "Superman"
Kent convinces Rogard to prepare to launch a nuclear missile from the USS Nautilus offshore if they cannot stop it. Dean and Annie revive Hogarth, and he helps return the Giant to his docile state, while Dean explains the situation to the military. Rogard is ready to stand down when Kent panics and orders the missile launch. Rogard furiously reminds Kent that the missile is locked onto the Giant's current position and they will all be killed in the blast radius. Kent tries to escape but the Giant stops him, and Rogard's men secure him. Hogarth explains to the Giant what would happen if the missile strikes. The Giant says farewell to Hogarth and flies off to intercept the missile, remembering Hogarth's words about being who ones chose to be, and the Giant says, "Superman" just before collision. The missile explodes harmlessly in the atmosphere. As the townspeople and military are relieved to be alive, Hogarth is saddened by the robot's apparent destruction.