It is safe to cook lobster soon after it dies. If you wait too long, the lobster will rot and you will get food poisoning.