Meaning of Hagia: plural noun – Eastern Church – the Eucharistic elements before or after the consecration.

Etymology:  Late Greek, noun, nominal use of neuter plural of Greek hágios holy

Wikipedia:

Hagia Sophia (lit. ‘Holy Wisdom‘; TurkishAyasofyaGreekἉγία ΣοφίαromanizedHagía SofíaLatinSancta Sapientia), officially the Hagia Sophia Grand Mosque (Turkish: Ayasofya-i Kebir Cami-i Şerifi),[3] is a converted former church and mosque and a major cultural and historical site in IstanbulTurkey. The last of three church buildings to be successively erected on the site by the Eastern Roman Empire, it was completed in 537 AD. The site was an Eastern Orthodox church from 360 AD to 1204, when it was converted to a Catholic church following the Fourth Crusade.[4] It was reclaimed in 1261 and remained Eastern Orthodox until the Ottoman conquest of Constantinople in 1453. It served as a mosque until 1935, when it became a museum. In 2020, the site once again became a mosque.