The events in the first Avengers film transpired in 2012 (as shown in Endgame), and Tony Stark referencing them in Infinity War reveals that these events happened six years ago, which means Infinity War was set in 2018.
However, the events in Thor: Ragnarok happened at the same time as the events in Civil War, which was set in 2016. And Infinity War takes place right after the events in Thor: Ragnarok, as shown in the post-credits scene of the latter.
Please clarify, although Bruce stated in Ragnarok that he has been Hulk for 2 years (which would have been 2017 since Age of Ultron was set in 2015).
Did the post-credits scene in Ragnarok happen a year later, after Asgard was destroyed by Surtur?