"tragic flaw," Greek, literally "fault, failure, guilt, sin" from hamartanein "to fail of one's purpose; to err, sin," originally "to miss the mark," from PIE *hemert- "to miss, fail." "The aspiration must be analogical. The word has no known cognates, but the reconstructed root looks perfectly IE" [Robert Beekes, "Etymological Dictionary of Greek"].
word-forming element indicating "branch of knowledge, science," now the usual form of -logy. Originally used c. 1800 in nonce formations (commonsensology, etc.), it gained legitimacy by influence of the proper formation in geology, mythology, etc., where the -o- is a stem vowel in the previous element.
The second element is prop[erly] -logy (-logue, etc.), the -o- belonging to the preceding element; but the accent makes the apparent element in E[nglish] to be -ology, which is hence often used as an independent word. [Century Dictionary]
<a href="https://www.etymonline.com/word/hamartiology">Etymology of hamartiology by etymonline</a>
Harper, D. (n.d.). Etymology of hamartiology. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/hamartiology