וַיְדַבֵּר יְהֹוָה אֶל משֶׁה בְּהַר סִינַי לֵאמֹר:
on Mount Sinai: What [special relevance] does the subject of Shemittah
[the “release” of fields in the seventh year] have with Mount Sinai?
Were not all the commandments stated from Sinai? However, [this
teaches us that] just as with Shemittah, its general principles and
its finer details were all stated from Sinai, likewise, all of them
were stated-their general principles [together with] their finer
details-from Sinai. This is what is taught in Torath Kohanim (25:1).
[And why is Shemittah used as the example to prove this rule,
especially since the very fine details are not even specified here
(Sefer Hazikkaron)?] It appears to me that its explanation is as
follows: [At the plains of Moab, Moses reiterated the majority of the
laws of the Torah to the Israelites before their entry into the land
of Israel, this reiteration comprising most of the Book of
Deuteronomy. Now,] since we do not find the laws of Shemittah
[“release”] of land reiterated on the plains of Moab in Deuteronomy,
we learn that its general principles, finer details, and explanations
were all stated at Sinai. Scripture states this [phrase] here to teach
us that [just as in the case of Shemittah,] every statement [i.e.,
every commandment] that was conveyed to Moses came from Sinai,
[including] their general principles and finer details [and that the
commandments delineated in Deuteronomy were merely] repeated and
reviewed on the plains of Moab [not originally given there].
The question the OP is asking applies only in the desert, as the entire Torah had been written by the time they entered the land.
Thus, the question would be about any question that is brought up in the desert as i explain below. It is not only a question that is answered in different parts of the Torah, but questions that exist before the command is written.
Moshe Rabbeinu was taught the whole torah. He told parts to Bnei Yisrael as needed and as commanded. Much of what he said was not written down. The word לאמר is a command to repeat the command and to put the words into the torah. I deal with this question at B'nos Tzelofchad, Yerushah and "Nitnah Torah V'Nitchadshah Halacha"
As an example of this case, I explain
According to the Art Scroll Bava Basrah 110b1 note 9. נתנה תורה ונתחדשה הלכה means that even after the tora was given at הר סיני, Moshe Rabbeinu had not yet explained that area of halacha to Bnei Yisrael. Technically then, Bnai Yisrael did not know the full halacha. An analogy can be brought to the halacha of פסח שני which was not told to בני ישראל until after some of the people could not bring the קרבן פסח the following year.
Thus, we can say that
Historically the daughters of Tzelaphchad stated their claim before
the laws of inheritance were handed down. Thus perhaps it was later
revealed that when both a son and a daughter survive the deceased, the
estate is divided between them (Rashbam)
Although the Torah states that Hashem concurred with the words of the
daughters of Tzelaphchad, this merely indicates that their general
claim was just. It does not prove that all their underlying
assumptions were correct. Thus, it is possible that the daughters
were mistaken in assuming that had there been a son, they would have
received nothing. See also Tosfos to 119b ד"ה אילו
Another point is that incidents in the torah did not happen until the time they were written. The halacha would have been given at Har Sinai, but the incidents that caused Moshe Rabbeinu to write about particular halachos (and explain them to Bnai Yisrael) did not occur until later when they were required.
A similar point is that all halchos were established from the beginning by Hashem. In many cases, any drasha that might be made, such as with a gzeirah shave would only reestablish a halacha that is already known from the mesorah. The chachamim use these drashot to enable them to remember or recover the halachot that Mosh Rabbeinu was taught.
For example, we see from Tosfos in Succah 31a ור"י סבר לא מקשינן לולב לאסרוג
דאין דן אלא למדה מרבו
we do not learn a gzeirah shave unless there is a mesorah.