The James Webb Telescope has captured a detailed image of the Apep spiral nebula. It was created by a pair of dying stars and their companion.

Before dying as supernovae, the most massive stars in the Universe shed their outer hydrogen layers, exposing their heavy cores. This stage, known as the Wolf-Rayet star, lasts only a few thousand years — a mere instant in cosmic terms. After that, the doomed stars explode, scattering their matter throughout the Universe.
Over the past decade, a team of astronomers has obtained an image of an unusual vortex nebula 7,000 light-years from Earth. Outwardly, it resembles a snake devouring its own tail. Therefore, astronomers named it Apep in honor of the Egyptian god of destruction.
At that time, researchers believed that Apep was a binary star system. However, a new image of the nebula taken with the JWST telescope presented a surprise. It appears that Apep consists of three stars rather than two. Two of them are in the Wolf-Rayet stage, while the third component of the system is a supergiant.
Wolf-Rayet stars produce winds of almost equal strength, which affects the structure of the nebula. The dust is spread out over a really wide area and “wrapped” around them like an arm. The JWST image also revealed three previously unknown dust shells around Apep. Each one is colder and dimmer than the previous one and is located at a perfectly equal distance.

According to scientists, when strong gusts of wind from the Wolf-Rayet star collide with the weaker wind of its companion, they compress each other. At the center of this storm, a dense, cool environment forms in which carbon-rich winds can condense into dust. The earliest carbon dust in space — the first material that makes up our bodies — was created in this way. Studying systems such as Apep gives us more information about the origins of Earth and the emergence of life on our planet.
According to Phys.org