I agree it is important to understand the different constituents. Worstnightmare33 did a good job of deconstructing the phrase.
Yet, in this case, knowing the constituents (name + how + become) only helps you so far and remembering the phrase as is is pretty useful in the end.
Chunking is a scientifically proven technique with a high recall rate in daily use.
Which specific TTMIK lesson do you recommend related to this question?
That's good for about the middle stage of learning a language. Once you're striving for fluency it's important to get to a place of "feeling what sounds right" so you can stop slowing yourself down translating or analyzing in your head. Speak and hear as many impromptu, natural utterances as possible because the constant internal analysis is only useful for written exams in schools.
교장 선생님 means "principal" (교 is school, 장 is chief in this instance). 성함 is the formal word for 이름, meaning "name". 어떠게 되십니까 or any variation thereof is very similar to the phrase "me llamó" in Spanish, meaning "I am called". It's like asking, literally, "How is the principal's name called?" which we interpret as "What is the principal's name?"
성함 is name. 성함이 어떻게 되세요 Is one of the ways Koreans ask for name. A literal translation would be, how did you become "name", which in English does not make much sense, so, just take the whole thing to mean What is [possessive] name? 선생님 Is teacher. (학)교장 Is the leading teacher, as in principal.
Literally you might go for "head teacher" (교장 선생님은). The word to follow is due to politeness issues (성함). It is the honorific form of 이름 (name). And as you see with the verb ending and with the teacher noun in general, the use of honorific forms is adequate here.
In general please try endic.naver.com or the Naver app. They are the best for looking up words in or into Korean.