Im by no means an expert. I do know theres multiple ways to do it. Like taking a photo of your foreground image then another of the background and stacking them that way so everything is completely in focus.
Then theres stacking and blending. I use a program called Starstax its free. And you just drag and drop all the photos and it stacks and blends them for you. Pretty simple to use. But in order to get long star trails youll have to take a lot of photos. The nice thing about the go pro is that it has interval shooting. So i can set it up with a full battery and just let it go till the battery dies if i want. One thing is if your going to have an object (like a jeep) out front, a program like starstax averages the photo so i used a flashlight on the jeep spread throughout the exposures to make it so the jeep was quite visibleinstead of being quite dark. I also like to shoot around 20 seconds.
Theres a "rule" for keeping stars "sharp". I use it for quick reference but basically its 500÷focal length and that should give you an estimate of max shutter time. Lol.
Eg. 500÷24mm
=20.8 seconds.