In light of the recent question 2000s movie where mysterious black alien spheres surround the Earth, the answer seems to be The Beyond, a 2017 British movie.
Set in 2019, The Beyond chronicles the groundbreaking mission which sent astronauts - modified with advanced robotics, through a newly discovered worm hole known as the Void. When the mission returns unexpectedly, the space agency races to discover what the astronauts encountered on their first of its kind interstellar space journey.
In 2019 an anomaly appears above the earth. Communications disrupted, there is a power outage on the International Space Station (ISS), and an astronaut, Jim Marcell, goes missing (presumed dead). [...] Strange orbs then begin to appear in the sky, and The Void starts emitting waves. Concern rises about the threat posed by The Void and The Spheres. A secret US military organisation offers its classified robotics technology - Human 2.0 - to help solve the Space Agency's dilemma. Human 2.0 was designed to fuse human brains with synthetic bodies to create more robust soldiers. The US military argues this technology will allow the Space Agency to send an astronaut successfully into The Void. [...]
Tensions continue to rise on earth, and military organisation begin to attack The Spheres. Johnson wakes up and reveals what she remembers after the communications blackout. She says there was a lot of light and when she closed her eyes the Human 2.0 soldier mysteriously transported out of the craft. She says the soldier looked fearful and kept looking at his arm, which detonated like a nuclear bomb. She passed out and awoke on a planet. On the earth, she met Jim Marcell who communicated to her that everything was going to be okay. The Space Agency is sceptical about Johnson's memories, although Laroux is hopeful this means Marcell is alive and The Void and The Spheres are not malign.
Soon after Johnson awakes, the solar system is destroyed and the debris is spotted heading for earth in a planet-destroying event. Suddenly The Spheres begin to change and form a protective barrier around the earth. The realisation dawns that the presence of The Spheres has been completely misinterpreted as an attack, whereas they'd been sent to protect the earth. The Void disappears. Marcell is detected in the Arizona desert unharmed but without any memory of what has happened. In the aftermath of the events, a new solar system appears, with another planet almost identical to earth, offering new hope for humanity. The film ends with Human 2.0s on Earth 2.0 encountering the lifeforms from The Void.