The dream might be your subconscious way of dealing with unresolved emotions towards that person.
like unresolved conflict, unspoken fears, or suppressed affection.
The dream could symbolize a significant change or transition happening in your own life or the life of the person you dreamt about.
It could represent the end of a certain phase or the need to let go of something.
Sometimes, these dreams can be your mind's way of confronting the reality of death and your fear of losing loved ones.
They might encourage you to cherish the relationships you have while you can.
The "death" in your dream might not be literal but symbolic.
It could represent the death of an aspect of your relationship with that person or the death of a certain behavior or pattern within yourself.