First, some interesting facts about sleeping which may help you:
1. Whatever you think about directly before falling asleep, wont be in your dreams.
2. Is it a nightmare which continues everytime you go to sleep, or are they all similar to eachother? Because from what i've heard, it's impossible to have the same dream more times than once.
3. Main causes of nightmares are high amounts of fear, insecure feelings about self, unpleasant thoughts throughout the day.
If you're stressed about having the nightmare, try techniques to calm yourself down (meditation, talking about it with friends/family)
Also, have you been playing scary games/watching scary movies which might relate to the nightmare?