Cartoon from early or late about a girl you think in the end she gets stranded on planet with robots and they build spaceship to get off planet?
The cartoon you're thinking of is called "The Last Starfighter" released in 1984. It's about a teenage boy named Alex Rogan who is recruited by an alien named Centauri to fight in an interstellar war. Alex must use his video game skills to pilot a starship and defeat the evil Xur and the Ko-Dan Armada, a race trying to conquer the universe. Centauri is an alien leader who is trying to save the galaxy. Alex is recruited to help him because he is a skilled video game player. The Ko-Dan Armada is an evil alien race that is trying to conquer the galaxy. They are led by Xur, a powerful alien warlord. Alex and Centauri must work together to defeat Xur and the Ko-Dan Armada and save the galaxy.