Maybe I was stressed or tired recently, or I watched a similar movie, which led to this dream.
After people fall asleep, the cerebral cortex is not completely suppressed, and various fantasy scenes appear in their minds, which is a normal physiological phenomenon of human beings.