According to Xia Ruolan's description of her dreams, in the first dream, she was directly "frightened awake" and then proceeded to the next dream.
In the second dream, however, she was continuously stung by the sharp thorns of a plant, which jolted her awake with a shock of pain, leading her into the third dream.
In the third dream, she was tripped by dumbbells, which eventually brought Xia Ruolan to full consciousness.
Therefore, Yan Junze deduced that the arrangement of certain items in the dream was directly projected from reality. The plants in Xia Ruolan's home were originally placed under the window sill, just like in the dream, and that's why she was pricked.
The same logic applied to the dumbbell.
That's why he had preemptively placed Burst Nails in certain spots around the house to find these sharp objects at critical moments in the dream, to prick himself and wake up quickly.