Marvel was successful in its first couple of MCU movies.
Marvel at that time had previously sold movie rights of some of its characters to other movie studios (Spider-Man, Fantastic Four, X-Men, Blade, Daredevil, Punisher, Hulk, Ghost Rider, etc)
Marvel Studios was run by a committee back then, made of Marvel top executives and one of the committee members was "Ike". Ike was older and old fashioned. Ike vetoed a Black Widow movie for many years claiming that comic book fans were male and would not go see a superhero movie starring a female. Ike vetoed all Black Widow merchandise when the first Avengers movie was released claiming the same thing about only male fans and they would not want a Black Widow action figure. (Kevin Feige eventually approached Disney and threatened to quit Marvel Studios if he had to keep working with Ike. Disney restructured Marvel Studios to be its own independant department, Ike would oversee Marvel comic books and Marvel TV shows but have nothing to do with the movies (which is why Agents Of SHIELD did not mix with the MCU as originally planned... Kevin ran the movies, Ike ran the TV and they did not like each other. After Ike was removed from movies, the first thing Kevin did was announce a Captain Marvel movie).
Ike was in charge of the TV and the comic books. One of Ike's ideas was that MCU movies should not have to compete against Marvel character movies made by other studios who had the rights. Ike was in charge of comic books and did whatever he could to ruin the movies other studios were making with Marvel characters (Fantastic Four, X-Men, Spider-Man, etc).
Fantastic Four comic books were canceled so there would be less interest in making movies about them. There was no Fantastic Four comic books for 3 years. Characters/members of the team moved to other comic books (like Avengers) where Marvel owned the rights.
X-Men was very popular and could not be canceled, but Ike made it an order that no new characters, no new mutants were to be created. Any new characters could/would be "Inhumans" which Marvel owned the rights to. (Ike was in charge of Marvel TV and tried to make Inhumans popular by making the Inhumans TV series... and including Inhumans in Agents Of SHIELD)
When they created Ms Marvel, they originally wanted her to be a mutant, but if she was introduced as a mutant in the comic books then her rights would be tied with X-Men and FOX would then own the movie rights to Ms Marvel and could include her in X-Men movies or make solo movies of the character. By introducing Ms Marvel as an Inhuman then Marvel owned the movie rights to the character.
Disney eventually gave Kevin control over Marvel movies, TV (Disney+), animation and comics
https://bleedingcool.com/comics/history-marvel-comics-fantastic-four/
https://variety.com/2019/biz/news/kevin-feige-ike-perlmutter-marvel-disney-1203377802/
https://screenrant.com/dc-kevin-feige-marvel-leave-mcu-report-details/