My review is on the way, but here’s a mildly spoilery out of context reading and viewing list for Avengers: Endgame.
First up, Children of Men.
Once you’ve seen the first hour this will make sense. As will the next one which is On The Beach.
I’m talking more of tone than plot here and a big lump of the film’s tone in that first hour seems ripped from the 1970’s BBC series Survivors written by Terry Nation.
But this is a film based off comics, so the main one is Secret Wars.
And of course all of Jim Starlin’s work, especially his Thanos series from 2003, and the climax to the original Thanos saga in the 1970’s.
Also, JLA/Avengers is a perfect one for the tone of the last hour.
Other Avengers books to check out are the Hickman run on New Avengers especially.
Also Peter David’s run on the Hulk is essential as the MCU’s arc for the character since the 2008 film owes much to his run.
Plenty of folk will be recommending Back to the Future as a film to help with the second hour of the film, but Alan Moore and Dave Gibbons Chronocops to me is a better example, and comic related. As is Alan Moore and Alan Davis’s Captain Britain stories which introduced the concept of an ordered multiverse into the Marvel Universe.
Finally of course, what MCU films can you watch in a speed binge before watching Endgame? Well, Iron Man, Captain America: The First Avenger, The Avengers, Iron Man 3, Thor: The Dark World, Guardians of the Galaxy 1 & 2, Captain America: The Winter Soldier, Avengers: Age of Ultron, Captain America: Civil War, Doctor Strange, Thor: Ragnarok, Ant Man and the Wasp, Avengers: Infinity War.
So there you go. This isn’t exhaustive or definitive but it is purely to help where influences may, or may not have come from.