The James Webb Telescope has captured images of a galaxy undergoing star formation, with traces of passing asteroids.