The Marvel Cinematic Universe initially shot on film for its first few installments. Iron Man, The Incredible Hulk, Iron Man 2 and Thor were all shot entirely on film. The switch to digital began with Captain America: The First Avenger, which shot on a mix of film and digital, and continued with The Avengers. However, with Iron Man 3 and the start of Phase Two, the MCU switched to an entirely digital production pipeline (except for Eternals) -- and the films have not looked as good as a result.
To clarify, that is not to say that the digital is an inferior way to shoot movies. Nor does it mean that less effort has gotten put into MCU films shot on digital when compared to those shot on film. However, the films in Phase One of the MCU have a distinct visual flair that is lacking in later entries. But despite the switch from film to digital being partly responsible for that, it's not as simple an issue as it may appear to be.
Film produces a naturally high quality and appealing image. In the digital age, audiences get used to screen specifications in resolutions. The world is more or less convinced that nothing can beat a 4K resolution. However, that's far from the case. Film footage doesn't have a resolution due to being an analog format. As such, as long as the shots are in focus, there are no limits to how crisp a frame of film can look. Additionally, colors are naturally vivid with a wide range of contrast. That is all touted as new technology with 4K screens and High-Dynamic Range, but it's all old-fashioned film stock.
However, the good looks come with a price. Film is much harder and more time-consuming to work with from a production standpoint, as directors can't review footage until it's processed. That means footage can't get reviewed on set, which adds more time if there are issues. Additionally, film reels don't run through perfectly straight when capturing images. And that is what gives film footage that charming little shake but can be a nightmare for post-production work.
Conversely, digital is much easier to work with. Shots can be immediately played back on set, and there's no shake to the footage. In many ways, it's a filmmaker's dream. However, the raw image data for digital footage is flat, especially compared to film. That is where the common criticism that "all Marvel movies are gray" originates. They're not all gray -- the filmmakers are just working from a much flatter-looking source image compared to film. It wasn't noticeable when they used a mix of film and digital cameras in Captain America and The Avengers, as the digital footage was color-graded to match the film footage. Digital footage simply needs to be graded more to give it a visual flair -- it's why color-grading has become a much more commonly employed technique in the last ten years.
The reason MCU films looked worse on digital was simply as part of a learning curve as the industry got used to working with a primarily digital production pipeline. However, there is hope for the future. James Gunn used pioneering Red Dragon digital cameras to shoot Guardians of the Galaxy Vol 2., which turned out to be a visual treat. Rian Johnson and cinematographer Steven Yedlin also created a means to make digital footage look indistinguishable from the film, using it to shoot Knives Out entirely on digital. Similarly, Sam Raimi and John Mathieson really pushed the color-grading of Doctor Strange In The Multiverse of Madness and brought New York to life in the MCU for the first time since The Avengers. The future may be all digital, but filmmakers are learning and growing.