For Photograph stars and night skies, you will be delving a bit deeper into the use of some of the manual controls of your camera like shutter speed, aperture, and ISO control. I also highly recommend shooting in RAW for nighttime photography, as it will allow more control when editing the final picture.
When photographing these tiny pinholes of light you will need as much light to hit your sensor as possible. Therefore it is important to use combination of high ISO, wide apertures, and long shutter speeds.
As you’ll see in the bottom right of this photograph there is a bit of light pollution from a city about 30 minutes away.
1 thing to do to try and minimize the light pollution is to find out where it is in a timely manner. To do this I typically will fire off consecutive shots all around the horizon having an absurdly high ISO (typically the highest my camera will go) simply to limit the time it takes for each shot to expose. These shots won’t be used in the final process, but they are valuable in letting me know which parts of the horizon are off-limits.
So far as exposure time goes, it is better to keep it as short as possible, otherwise you will wind up with motion in your stars as the Earth rotates. As an example, my kayak photograph was shot at 30 seconds, which was really somewhat long and if you look closely you can see some movement at the stars.