The Sacrifice of Natasha Romanoff was the ultimate step that was required in order for the Avengers to obtain the Soul Stone. When the Red Skull informed Black Widow and Hawkeye that they must sacrifice something that they love, the two fought over who would be the one to die, each wanting themselves to be the one, resulting in Black Widow being the casualty.
After discovering that they could use the Quantum Realm and Tony Stark's Time-Space GPS to travel through time and space, the Avengers hatched a Time Heist, in which they would travel to the past and amass the six Infinity Stones in order to undo the Snap. Clint Barton and Black Widow were sent back to 2014 with Nebula and War Machine. Eventually, after dropping War Machine and Nebula on Morag to obtain the Power Stone, the two heroes went to Vormir so they could seek the Soul Stone and return to the present day with it.
Upon encountering Red Skull on Vormir, Black Widow suddenly learned that Gamora's sacrifice was the main reason why she didn't return upon being kidnapped by her father. Thanos had essentially traded in her soul so he could get the Soul Stone, as he was required to give up a soul for a soul. Black Widow and Clint Barton fought against each other as both were willing to sacrifice themselves for the Soul Stone, until the two of them ended up of the edge of the cliff, above the rocks where the sacrifice was made. As Black Widow was below Clint Barton's level while hanging off the steep mountain, she decided to let go and sacrifice herself so the Avengers could get the Soul Stone.
Clint Barton suddenly woke up in a pool with the Soul Stone in his hand. Barton mourned over Romanoff's death before using his remaining Pym Particles to return to the present day. When the other Avengers asked him about why Black Widow didn't come back, Barton was very reluctant to answer. The Soul Stone was then placed within the Nano Gauntlet, created by Tony Stark, Hulk, and Rocket Raccoon.
Returning to Vormir
Following the Battle of Earth, the Soul Stone was placed in a suitcase and given to Rogers, who traveled back in time to 2014 to return the Soul Stone on Vormir. On Vormir, Rogers encountered Red Skull, although he merely relinquished the Infinity Stone to his old foe without any altercation.