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.
As part of their mission to retrieve the Infinity Stones for the Infinity Gauntlet that would bring back the snap victims, 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.