"What grade are you in?"
年生 means "-grade student" or "-year student", as you would say "1st year student" or 一年生
学年 is talking more about the concept of "year levels" as a whole. If you were to sort the entire school by 学年, you would have all the 4th graders together, and all the 2nd graders together, etc.
Japanese kanji almost always have multiple pronunciations (often grouped into on'yomi/Chinese-derived pronunciations and kun'yomi/Sino-Japanese derived pronunciations) and which one is correct depends heavily on the context in which the character is used.
So, in the context of 「年生」, 生 should be pronounced せい. However, in the context of 「生」on its own, it should be pronounced なま. It's giving you the correct pronunciation but Duo's TTS program falls down for new learners because they haven't configured it correctly.
i, don't know much about the categorization of sentence structure components, so i can't tell you if it makes it a noun but i can say 何 means "what", and I'm pretty sure it's a different word, not an add-on part to another word so, literally translated, the sentence is "what grade are/is?" with the "you" implied 何 (なに, what) 年生 (ねんせい, grade) です (are/is) か？(makes it a question)
I think you are already read one of my other comments in another thread ;) but there is a pattern of using 何 with counter words to make a question word.
So ～年 is the counter for years, and 何年 is a question word or expression for "what year?", adding 生 which means "student" transform this whole thing 何年 -生 to "What year student?", or "what year are you are a student of?", or "What year are you in?".
Other counters that can use this and that you will find in duo are 何時、何人、何歳、何時間、何日。
Also if you google list for counters you also notice the usually include the question word at the end because of this, take for example the table in this article:
No veas ambas formas como lo mismo, en el caso de 何年生ですか lo que estas haciendo es usando la forma de pregunta del clasificador ～年 junto con un sufijo ～生 que indica el significado de estudiante,
一年 "primer año"
五年 "quinto año"
何年 "que año?", 何年 -生 "estudiante de que año?"
y en el segundo caso estas usando 何 en una expresion de pregunta「何ですか」que significa algo similar a "que?" en una forma muy cortez.
En general en japones la mayoria de las palabras tienen significado muy diferente aun asi usen un mismo kanji, es mejor buscarlas por separado en un diccionario y no asumir que significan lo mismo.