For star-filled skies you need to be somewhere truly dark and make a big ask of your equipment in terms of good high-ISO performance and lens sharpness while wide open.
Start with your widest angle lens to minimise issues with focusing and try to include a foreground element such as a tree or structure. Restrict your exposures to 30sec or below and start at ISO800 f/2.8.
> If your lens doesn't open that wide, go to f/4 and ISO1600 etc.
> If the exposure's too bright, you need to move somewhere darker or you're not going to achieve the star filled look.
> If the exposure's too dark, firstly increase the ISO and try again. Repeat. Open up the aperture beyond f/2.8 only if you reach the limit of your ISO.
Even in areas of low light pollution stars are always fewer in number and less clear as you get closer to the horizon so try to aim high (bearing in mind the foreground element suggestion above).
Imagine if you could just keep on walking...
For startrails you can either fire a bunch of consecutive shots from the same camera position then merge them all in StarStaX (free software), in which case you can work in almost any ambient light conditions...
Arch Rivals
...or you can set yourself back to your dark site and work backwards from your high-ISO settings to see what's the longest you can expose at lower ISOs. For instance, 30 seconds at ISO3200 and f/2.8 becomes 16 minutes at ISO200 and f/4 - that's plenty long enough to capture some movement in the sky. (This was a single 26 minute exposure at ISO200 f/2.8 - it's really, really dark down there.)
Time