Warning: full spoilers for Avengers: Endgame ahead!
As part of their plan to undo Thanos’ elimination of 50% of all life in the universe in Avengers: Endgame, the Avengers had to go back in time to various points in the MCU’s history to retrieve each of the Infinity Stones before they were destroyed. Thor returns to the events of Thor: The Dark World to obtain the Reality Stone, where he receives some words of wisdom from his mother: “Everyone fails at who they’re supposed to be. The measure of a person, of a hero, is how well they succeed at being who they are.” While meant for Thor, these words also apply to the other two members of the core Avengers trio: Tony Stark and Steve Rogers, who both fulfil their destinies in the film, by finally realizing that they had each been living lives meant for the other.
Source: IGN.com How Iron Man and Captain America Traded Destinies In Avengers: Endgame