This is a generalization from this question on finger of death, but I do not think it is a duplicate. The answer to that question hinges on this one, but they are ultimately separate.
Using Finger of Death(FoD) as our example:
Character A is making death saving throws due to FoD from Character B.
Character A has 2 Death saving throw failures.
Character C attacks character A, causing an automatic Death Saving Throw failure and the Character A subsequently Dies.
Finger of Death states:
A humanoid killed by this spell rises at the start of your next turn as a zombie that is permanently under your command...
In order for that clause to trigger, does Character A have to fail 3 death saving throws? Or would any death occurring after the FoD be the cause of Character A's death (specifically another creature 'finishing' Character A before the final death save from FoD occurs?)
In other words, did Character A die from failing death saving throws (which was caused by FoD), or did Character A die from taking damage from Character C (which resulted in the final death saving throw failure from FoD)?