I keep having nightmares that someone is trying to kill me?

The other night I had a dream that there was a shooter in my neighborhood. I got shot and I felt myself bleeding out in my dream and then I don’t remember anything after that. Then last night was REALLY strange, I was away on vacation staying at a condo and it was haunted, ghosts or people, I’m not really sure, were in the house and chasing my friends and I around with a knife. Then I remember someone got me and slit my throat. Why do I keep dreaming these horrible dreams?!!! My anxiety and depression have been kind of bad lately, so maybe that causes nightmares? But what do these dreams mean?