First thing to do, is set your ISO to the lowest value (ISO200 on the XS, IIRC) to start with. Make sure auto ISO is turned off, or it will just bump it back up. A tripod is a must for good results. at least most of the time. You also have to make some choices as to what part of the scene you want exposed. Meaning, are you wanting to capture the colour of the sky, the foreground or a little of both? You might want to experiment with full manual settings, or aperture priority (TV on Canon models I believe) for the type of photo you want.
If you want to capture the colours in the sky, and don't care if the foreground is dark, switch to spot metering and set your exposure based on that. Meaning point that active auto focus point at the part of the scene that you want the exposure to be based upon. That is why I suggested using one of the more manual controls. First focus on what you want in the scene, then disable auto focus. Next aperture, I find anything between F5.6 and F10 works best for the type of shot you are describing, take several shots if you can to see which you like best. I will often take 5-10 shots of the same scene before I'm happy with it.
I used that set of options to take this shot.
If you want to expose differently, that is when things get complicated. Maybe you could show us some examples of what you have taken so far, then we can give you more tips.