In regards to an abortion...Numbers 5:11-31, Hosea 9:14-16, 2 Samuel 12:14-18...
The verses cited in Numbers regard making a woman infertile and barren, not killing an unborn child. (the same with Hosea 9:14)
The other two are acts of God, who, unlike mere men, is the ultimate judge and therefore just in all his decisions. We cannot make those same choices. After all, God also wiped out nearly the whole human race except Noah’s family because he found them to be wicked. That doesn’t make it righteous or just for us to commit genocide. We can’t make ultimate judgements like that–only the Lord.
In both deaths, (a) the act is fully referred to as a murder or death, thereby supporting the fact that there was indeed a full, fruitful life to be ended, and (b) both were the direct consequence of sinner’s actions. David’s child was born dead because he murdered Uriel in cold-blood to try and cover up his own mistakes; the childlessness of Israel came about from their constant betrayal of God to paganism.