can someone teach me how does the trigger work when:
the trigger activates right on the spot where the unit dies
None.
Constantly center a location on the unit that is going to die, the condition for the centering should be If Player x Brings at least 1 Unit to Anywhere, and make sure there is a trigger before it has one of the following as the last action, even if it doesn't do anything: Kill Unit, Kill Unit at Location, Remove Unit, Remove Unit At Location, Move Location, Move Unit.
This is to ensure that Bring is updated properly, otherwise the location may be moved to the center of the map.
Now, you detect when the unit dies with the Deaths condition, and then do your trigger at the location that was following it.
None.