A deleted scene from Avengers: Endgame provides more details on how the Snap works, and what happens to those impacted by it directly.
The scene is available on Disney+ and showcases an alternate version of the Hulk's (Mark Ruffalo) conversation with the Ancient One (Tilda Swinton). While explaining the temporal ramifications of removing an Infinity Stone from its proper timeline, she reveals that she knows how the Snap functions on a metaphysical level.
According to the Ancient One, no one was actually murdered during the Snap. Instead, they were "willed out of existence," which is very different from death. Death is permanent; a snap is not. This would explain why Hulk was to bring back all the snapped heroes with his snap, but not Black Widow (Scarlett Johansson) or Gamora (Zoe Saldana), who died natural deaths.
This would also seem to confirm a longstanding theory that Thanos (Josh Brolin) is not actually dead, but was willed out of existence by Tony Stark. This, combined with the confirmation that the Infinity Stones still exists in the present-day MCU timeline, would open the door for a possible return for the Mad Titan.
Directed by Joe and Anthony Russo, Avengers: Endgame stars Robert Downey Jr. as Iron Man, Chris Evans as Captain America, Mark Ruffalo as Bruce Banner, Chris Hemsworth as Thor, Scarlett Johansson as Black Widow, Jeremy Renner as Hawkeye, Brie Larson as Captain Marvel, Paul Rudd as Ant-Man, Don Cheadle as War Machine, Karen Gillan as Nebula, Danai Gurira as Okoye and Bradley Cooper as Rocket, with Gwyneth Paltrow Pepper Potts, Jon Favreau as Happy Hogan, Benedict Wong as Wong, Tessa Thompson as Valkyrie and Josh Brolin as Thanos. The film is available on Digital HD, Blu-ray and 4K UHD.