The film was of course inspired by its comic book counterpart. However, as with any adaptation, the scriptwriters and director definitely changed up some things in the characters transition to the big screen in order to make it more palatable for the wider audience. In fact, if it were up to comic book writer Kelly Sue Deconnick, the film would have played out much differently. In an interview with io9, she had this to say:
What I wanted to do is have Carol time travel, so she’s in the scene where she’s getting her powers. She’s there with Helen Cobb who’s another pilot hero of hers, and she and Helen are watching the moment. Helen wants those powers, so she intentionally runs into the scene to be caught in the explosion. I wanted Mar-Vell to grab Helen, which would leave Carol needing to go in and rescue her younger self so that when the machine exploded it would transfer Carol’s powers from Carol to Carol, so that she would become the source of her own power. So it was an intentionally feminist reboot.” In the same interview, Captain Marvel producer Mary Livanos went on to mention that the filmmakers definitely drew huge inspiration from Deconnick’s story beats and ideas. While the aforementioned story ideas are exciting, ultimately we’re fine with how the film played out as a whole. (Source: io9)