What triggers first, an enemy's if it would die targeted to my unit or my unit's if I would die like Zhonyas?

When multiple replacement effects (such as Zhonya's Hourglass or other "if it would die" effects) would apply to the same event, the player who controls those effects chooses the order in which they are applied. If replacement effects controlled by different players would apply to the same event, the game rules for simultaneous effects (often involving turn player priority) determine which effect applies first.

According to Rule 443.1.d.8 (which discusses the assignment of effects when multiple units are involved) and the general principles of replacement effects (Rule 365):

  1. Controller's Choice: If you control multiple replacement effects that would apply to the same event (such as a unit dying), you choose the order in which they resolve.
  2. Replacement Logic: Once the first replacement effect resolves (e.g., Zhonya's replaces the death with a recall), the unit is no longer "dying." Consequently, any subsequent replacement effects that were waiting for that death event no longer have a valid trigger condition and will not resolve.
  3. Simultaneous Events: If multiple units die simultaneously, you (as the controller of the replacement effects) choose which death event each replacement effect applies to.

Summary: If you have a Zhonya's and an opponent has a similar effect, the rules for who controls the effect determine the outcome. If you control both effects, you choose the order. If you and your opponent each control one, the game rules for simultaneous triggers and replacement effects dictate that the player whose turn it is (or the player who controls the specific effect) will have priority in ordering them.