なぜ + [verb (plain)] + のですか なぜ + [i-adj] + のですか なぜ + [na-adj] + なのですか なぜ + [noun] + なのですか
なぜ means "why". It usually comes first in the question, and the question ends in のですか (んですか in speech), because you are asking for an explanation.
A noun or な-adjective needs な before の.
All three mean "why" and differ in register. なぜ is the formal one, at home in writing, speeches and careful speech. どうして is the everyday polite choice, and なんで is casual, for friends and family.
These go beyond asking someone directly.
A なぜ question ending in か can sit inside a longer sentence, before a verb like わからない分からない or しっている知っている.
With のだろう at the end, you are asking yourself rather than anyone else.