You can't. You use for this image high value for aperture and long shutter speed. The aperture make the rays. The long exposure make the moon as bright spot.
The usual settings to take photo of the moon are F8, ISO 100, 1/100s.
You can take two consecutive photos (rocket launch and then moon) and combine them in post.
BTW you do not need such aperture as all the objects are on great distance. Set it to F8 for example and decrease ISO to 100 to get much noiseless image.
And to expand slightly, the reason for those settings is that the moon is sitting in direct sunlight. So you use the kind of settings you'd use for shooting during the day (less about a stop due to the distance and atmospheric effects). Your brain has sufficient high dynamic range processing (thanks to an incredibly fast auto aperture mode in your eyes) to see both clearly, but a camera does not.
And to add also: with your eyes you do not see the entire trace as it is on the photo, you see just moving light. So replace the moon in post. Or be happy with the photo (I personally like it :) )