From the Greek hagios which means ‘holy’ or ‘saintly’. A hagiography is a – generally idealizing – text about the life of a saint. Or a venerated person. (See Oxford Reference or Merriam Webster)
Once Christianity has a strong foothold in Europe in the early medieval period, there is strong increase in the cults of saints. In particular, hagiographies about martyrs are popular with their gruesome details of torture and death, but also of miracles that happen during the saint’s lifetime or thereafter (See Encyclopaedia Britannica).
An example is Saint Eulalia, a Spanish teenagerput to death for standing up for her faith during the days of the Roman empire. The oldest surviving Old French literature is actually a song about her, a brief hagiography called Sequence of Eulalie. (See Catedral de Barcelona).