Stillbirth and neonatal deaths have clear legal definitions, based around the timing of death before, at or after birth:
Stillbirth: Your baby dies before or during birth and after 24 or more weeks of pregnancy.
Neonatal death: Your baby is alive at birth but dies within 28 days.