The Avengers (2012) took approximately two and a half years from initial development to theatrical release.
This was relatively fast for a first-of-its-kind superhero ensemble film. The groundwork was laid by preceding MCU films (Iron Man, Thor, Captain America), which established characters, visual language, and shared universe infrastructure.