Theoretically, the movie lays out how the MCU can bring neither back thanks to the rules of the Soul Stone etc. However, Gamora being snatched up from the past and brought to the present brings an earlier version of her character back into the Guardians franchise, so why wouldn’t they do that immediately?
Avengers: Endgame features two huge deaths when –and big spoilers here — we lose Black Widow and Iron Man.
I don’t think it can be because it would change the past, because Nebula killing her past self seems to have done nothing.