Allah assigned the noble recording angels to record human deeds.

Recording Angels, the Angel of Death, and Questioning and Punishment in the Grave