Lets call this girl Linda Lee Danvers, she is a 14 year old girl who's dying of cancer, her family has tried everything but its not working, now her mother is a scientist working at Star Labs, She is overseeing the work on the Kryptonian ship, and in a last ditch attempt to save her daughter's life she up loads her daughter's memories after she had died to the supergirl clone that she grew to match her daughter's age. She wakes up as Supergirl.