(There are some major spoilers ahead for "Captain Marvel")
Looking back, "Captain Marvel" is a bit of an oddity in the Marvel Cinematic Universe canon, coming just ahead of "Avengers: Endgame" not having any plot relationship with that film. and since it takes place in 1995, it feels like it could have been released pretty much any time in the first decade of the MCU.
In terms of MCU lore, perhaps the most interesting aspect of "Captain Marvel" is the way it adds an interesting new chapter to the story of the most well known of the Infinity Stones -- the Tesseract, aka the Space Stone -- and if you're acquainted with the Mar-Vell character from the comics then some of the liberties taken with that character here will no doubt come as a major surprise.
And no, I'm not talking about the choice to have Mar-Vell be played by a woman (Annette Bening) instead of a man, though that's obviously a pretty cool change. I'm talking about the big twist, that the Kree are actually the bad guys and Carol Danvers' (Brie Larson) Skrull foes are actually just refugees. And that Mar-Vell was working with them and against her Kree masters.
Mar-Vell, who may or may not have carried the Captain Marvel mantle before she was killed by Yon-Rogg (Jude Law) in 1989, was on Earth because that's where the Tesseract was at that time -- she was trying to develop what various characters refer to as a "lightspeed engine" though would, likely among other things, help the Skrull refugees led by Talos (Ben Mendolsohn) escape from the gaze of the Kree.
That work would eventually result in Carol herself obtaining her powers -- which, since said abilities are fueled by Tesseract energy, could be measures greater even than the ones she has in the comics. The Tesseract, of course, is the casing for the Infinity Stone known as the Space Stone.
But there's a fascinating detail in "Captain Marvel" that could throw you for a loop: when we first see the Tesseract in the movie, it's secreted away aboard a cloacked spaceship that Mar-Vell had been using as a laboratory. The film doesn't explicitly explain why it was up there rather than at the human base where Mar-Vell worked while in disguise, but we can infer based on other movies in the Marvel Cinematic Universe and clues that "Captain Marvel" itself dropped.
It's been a while, but you may recall how in the first "Captain America" movie the Tesseract was found by Hydra leader Red Skull (Hugo Weaving), and he used it to create a whole bunch of dastardly new weapons, including bombs that he was going to drop on every major world capital. But Captain America (Chris Evans) foiled that plan, and the Tesseract was briefly lost in the Atlantic Ocean, where Howard Stark found it.
The next time we saw the Tesseract was in the first "Avengers" movie. At the beginning of that film the Tesseract was in the possession of SHIELD and the United States government at a base that housed Project Pegasus, which existed to study the Tesseract and attempt to harness its energy for various projects. Then Loki stole it and went on his rampage across the planet which culminated in the Battle of New York at the end of the movie.
An important detail in "Captain Marvel" that would be easy to miss is that the base that Mar-Vell worked at in 1989, and which Carol Danvers and Nick Fury (Samuel L. Jackson) infiltrated in 1995, is none other than that same Project Pegasus base that we saw in "Avengers."
So what we can infer, then, is that Mar-Vell, in disguise as Wendy Lawson, was able to simply take the Tesseract up to her space laboratory because she was in charge of Project Pegasus. It was probably a big deal that the Tesseract went missing for six years before being returned at the end of "Captain Marvel," but it's likely that project officials simply thought it had been destroyed in the crash that resulted in Mar-Vell's death.
At the end of the movie, in the post-credits stinger, Goose the Flerken puked up the Tesseract onto Nick Fury's desk and Project Pegasus continued on until the events of "The Avengers."