Hulk was always going to be the one to execute the second snap that would've undone Thanos' Decimation in Avengers: Infinity War.
At that point, it had been established how wielding the power of all six Infinity Stones at once can result to permanent physical injury, evidence by Thanos' burnt left arm after he clicked his fingers. So, naturally, the heroes needed their strongest ally to enact the snap for them. And while there was a short commotion on who should do it, the film's directors, Joe and Anthony Russo, revealed that it was always going to be the Hulk.
Hosting a Thor: Ragnarok established that he's the strongest Avenger.
It's no secret that Avengers: Endgame's five-year time-jump. By then, Bruce Banner had found a way to integrate both of his personas together, resulting in a being with the consciousness of the brilliant physicist and his alter-ego - "best of both worlds,b" as he called his current state.
Then again, despite having the strength of the Hulk, the film has yet to see him use it before he enacted the second snap. The character was mostly utilized for his brains, helping to figure out the Time Heist and explaining how time travel doesn't really work the way it did in Back to the Future. And since they already rid him of his prowess in Avengers: Infinity War, Avengers: Endgame highlighted his physical capabilities; and what better way to do that than to wield the power of all six Infinity Stones and bring back half of the population to life?
On top of that, it was also a subtle character arc loop. Having always wondered what the purpose of his gamma radiation mishap that brought out the Hulk was, the line, "I was made for this," as he assumed the responsibility of putting on the glove, was monumental to his personal journey. No word yet on when he'll pop out in the MCU again after Avengers: Endgame has been revealed, but fans can expect Smart Hulk to still be involved in the universe moving forward.
Source: Joe and Anthony Russo