What the hell happened here is a popular quote from Avengers: Endgame.
The phrase is said by Ant-Man (played by Paul Rudd) and is used online as a reaction image macro.
Avengers: Endgame premiered on April 26th, 2019 in the US.
The film is set five years after the plot of Avengers: Infinity War and presents the audience with Scott Lang (aka. Ant-Man) learning that half of all life has ceased to exist.
After hearing these news, he simply responds “what the hell happened here?”.
The first case of the reaction image was posted on Imgur on June 25th, 2019 by ApexLegend117.
The template first appeared on Reddit in August, 2019 in the r/dankmemes subreddit.
It then popped up on other subreddits, as well as Twitter and iFunny.