In at least one case, it seems there was a strong collaboration, as the team behind the most recent, and the upcoming Avengers films were involved in crafting the end credits sequence of Ant-Man and the Wasp.
One of the questions that fans frequently have regarding the Marvel Cinematic Universe films is just how often other parts of that universe influence any given project.
Are writers and directors required to include particular elements in a movie in order to move the larger universe forward in the correct way?