A time of death is called by a medical doctor or qualified medical examiner. This is listed as an official death on a death certificate.
Other proclamations of death do not carry legal weight.
The common sense definition of death is - lack of respiratory function and the stopping of the heart. Extraordinary measures can keep inflating the lungs and the heart can be kept beating by electrical measures, so some people say death occurs when the brain no longer functions.
Existentially, death is a concept and nothing is ever really dead. At the atomic level, life goes on - even in inanimate objects.
Religiously, death is a concept where the 'spirit' leaves the body. What and where this spirit is, is subject to religious doctrine.
People have been trying to define death for as long as life has existed.