The Chosid Yaavatz (Ohr Hachaim) says that Chazal knew science form a Mesroah that goes back all the way to the Neviim, who knew it from Hashem, without any effort at all.
Particularly interesting is a statement on this topic in the Aruch Hashulchan (EH 13). Quote: “I will tell you a great principle: Chazal, besides their holiness and wisdom in the Torah, were also greater scholars in the natural sciences those savants (“mischakmim”) who would argue against their pure words. And someone who disagrees with them testifies about himself that he does not believe in Torah she bal peh, even though he would be embarrassed to admit it outright.” Drashos Chasam Sofer Vol. 1 p.100b says Our prophets and sages know all the sciences much better than the scientists even though all they learn is Torah. This is because the One Who created nature informs our sages of the correct facts. This is what amazes the Nations, as it says, Am navon v’chacham hagoy hagodol hazeh! An identical interpretation to that of the Chasam Sofer’s explanation Am navon v’chacham is found in the Ramak (Sefer HapPardes 13:6) regarding astronomy.