In Majjhima Nikaya 63, the Buddha says
So, Malunkyaputta, remember what is undeclared by me as undeclared, and what is declared by me as declared. And what is undeclared by me? 'The cosmos is eternal,' is undeclared by me. 'The cosmos is not eternal,' is undeclared by me. 'The cosmos is finite'... 'The cosmos is infinite' ... 'The soul & the body are the same'... 'The soul is one thing and the body another'... 'After death a Tathagata exists'... 'After death a Tathagata does not exist'... 'After death a Tathagata both exists & does not exist'... 'After death a Tathagata neither exists nor does not exist,' is undeclared by me.
"And why are they undeclared by me? Because they are not connected with the goal, are not fundamental to the holy life. They do not lead to disenchantment, dispassion, cessation, calming, direct knowledge, self-awakening, Unbinding. That's why they are undeclared by me.
What is the opinion of Buddhism on Cosmology, which tries to deal with these questions (highlighted in bold above) about the cosmos? Is pursuing cosmology discouraged in Buddhism? (Cosmology, in this question, refers to the branch of Science and not metaphysical speculations about the universe. It is understood that Buddhism discourages idle speculations about the universe. But what about the pursuit of the science of cosmology?).