It's not entirely uncommon for the lead actor in a major blockbuster to get injured while filming the project. Tom Cruise previously broke an ankle on the set of Mission: Impossible - Fallout and Daniel Craig pushed through filming on SPECTRE with a busted leg. Even the Marvel Cinematic Universe isn't immune to this pratfalls as MCU head honcho Robert Downey Jr. broke his ankle while filming the 2013 sequel, Iron Man 3, with the shot of his injury even included in the final cut. Unlike other major movies where such an even occurs however, Downey's injury actually resulted in a number of good things happening for the production.
The recent book, The Story of Marvel Studios: The Making of the Marvel Cinematic Universe, went into detail about what happened on the set in the immediate aftermath of Downey's injury and how the downtime it caused ended up being a blessing in disguise. According to authors Tara Bennett and Paul Terry, Downey's injury would have sidelined him for six weeks, meaning no Tony Stark on set for 42 days, and as a result, as executive producer Stephen Broussard out it, " "We suddenly had the space and time to figure (the third act) out." Filming continued without Downey, who did return to set for more static shots of Stark, but that wasn't the last wrinkle.
According to the text, VFX house Digital Domain was working on the big third-act finale, including the explosive "House Party Protocol" sequence, but filed for bankruptcy mid-way through production, resulting in Weta Digital having to step in (Broussard noted they "absolutely crushed it" too). Furthermore they would add composer Brian Tyler during this time as well, giving him even more time to finish his score for the sequel.
This anecdote about Iron Man 3 is just one of several new reveals about the production of the Marvel Cinematic Universe from the book with others including: how producers on Avengers: Endgame were worried that the film's all-female sequence in the end might be perceived poorly, how The Academy's poor decision making seemingly helped Black Panther take home Oscar Gold, how the cast of the original Ant-Man movie almost departed after director Edgar Wright left the project, and how the iconic Black Sabbath song was almost left out of the original Iron Man movie.
Iron Man 3 is now streaming on Disney+.