I have heard that buddha asked one of his students who was trying to find out more about the universe not to do so because there is no end to seeking such knowledge. The more we find out about the universe more questions rises. He asked his followers to focus on ending desire and attain Nirvana.
The Buddha was all for seeking higher knowledge in the field of science and maths [and everything else]. He has preached that people must study and develop their minds. A well-developed mind, is a mind that can understand the true meaning of his teachings and attain nirvana more easily.
I honestly don’t know where you got this wrong info from.
The best Buddhist monks all have PhDs and Doctorates. One of the first universities in the world was a Buddhist university in India.
Actually, the question is pretty valid. In two cases, a similar question was asked. One was by a general who asked the Buddha if he should also give up fighting and be like Buddha. Then Buddha encouraged the general to fight valiantly and accept death if that was the outcome. If he won, even that is not a big deal because of the fickleness of good fortune which might leave him at any moment.
There was another monk who was interested in conducting Business. Buddha encouraged him to engage in business for the benefit of others.
Like you said, science will not help you reach the goal. But by struggling hard and by working hard you can discipline yourself. Like the above two aforementioned people if you can leave out the thought of gain and loss, then it would be a blessing to you.
Every man naturally desires knowledge; but what good is knowledge without fear of God? Indeed a humble rustic who serves God is better than a proud intellectual who neglects his soul to study the course of the stars. He who knows himself well becomes mean in his own eyes and is not happy when praised by men.
If I knew all things in the world and had not charity, what would it profit me before God Who will judge me by my deeds?
Shun too great a desire for knowledge, for in it there is much fretting and delusion. Intellectuals like to appear learned and to be called wise. Yet there are many things the knowledge of which does little or no good to the soul, and he who concerns himself about other things than those which lead to salvation is very unwise.
Imitation of Christ