The USAF was able to induce NDEs in pilots by subjecting them to high G-forces:
https://magazine.tcu.edu/spring-2008/losing-consciousness-cockpit/
They weren't trying to do that, they were studying the effects of such forces on pilots who were flying their (then) new F-15 and F-16 jets, which were able to create much higher forces than a person could normally withstand.
They also asked the pilots to describe the symptoms they experienced while in the centrifuge or in flight. A clear pattern emerged. The first thing they experienced was tunnel vision, which results from a lack of blood flow to the eyes and is a precursor to a blackout. Then, while unconscious, many of the subjects experienced short, vivid dreams, or dreamlets. The dreams were often about past experiences or family and friends.
In addition to dreamlets, a significant number of pilots reported having out-of-body experiences. The subjects described the sensation of floating above their planes and looking down at their bodies. Sometimes the dreamlets and out-of-body experiences were accompanied by feelings of euphoria and warmth. Some subjects said they saw a bright light.
Surprised by his findings, Whinnery sought out scientific literature about reported out-of-body experiences. He found that out-of-body experiences were reported by cardiac arrest patients who were resuscitated. The pilots and heart attack victims had something in common: a momentary loss of blood to the brain.