This is a problem of fluctuation in price level of tickets, i.e.
Inflation
Yes, grandpa is right in saying that Star Wars episode IV in 1977
had more ticket sales, but when accounting for inflation, ticket
prices do matter as, higher ticket prices in 2019 would have
increased gross earnings of Avengers : Infinity War to a larger
extent than Star Wars episode IV.
According to "All time box office rank", Avengers: Endgame in 2019 is the highest life time...