After the death of a person, the nails cannot continue to grow. The nails grow longer because the skin around the nails shrinks and shrinks, which makes the nails grow longer.
As for why hair and nails continue to grow, it is because the body begins to become dehydrated after death, and our skin has a lot of moisture. When the moisture is gone, the skin begins to shrink, so the nails and hair that were originally under the skin will be exposed, making people think they are newly grown, but in fact they are not.
Furthermore, the growth of nails requires the supply of glucose. Normally, the nails of normal people grow by about 0.1 mm per day, and the growth rate depends on the glucose content in the human body. If the human body dies, the body will not consume glucose.