Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question.
Depending upon what effect you want to produce there are various things to try.
Portraits against a sunset must be backlit, for sure. Some say a fill flash, which would be an off-camera flash, can help make faces something other than dark blotches; and a faster shutter speed can bring out the sunset colored clouds and make the background colors richer.
However, using no flash, and overexposing the background can let you catch the face and less-lit foreground. Some say this is stylish.
And with no flash, aperture priority mode can help too, while the sun is not yet set. After the sun is below the horizon, switch to Manual mode.
An aperture of at least f/5.6 leaves the clouds in the background relatively sharp (assuming clouds) but you'll need a low enough and long enough exposure to gather enough light. A setting of up to f/8 can be good, though.
To make sure you get exposure right, pointing the camera at the sun without the subject and adjusting the light metering, then including the subject, can help.
Don't use automatic White Balance. Try for something between 3,000 and 4,000 Kelvin of white balance.
This may also be full of useful tips for the sunset photographer:
If this answers your question, please rate my answer. A five-star rating would be appreciated!