Asking, and seeking treatment, are both in the text
If somebody has implied that continuing to want this, or continuing treatment, is a failure of tawakkul, here is the material.
Zakariyya asked for a child. He was old, his wife could not bear children, and he asked anyway, and he was answered rather than reproached. Ibrahim praises Allah for granting him children in old age. And in the account in Surah al-Anbiya the wife is described as being cured, which is the Qur'an describing a physical intervention in exactly this situation.
The verses about Allah giving males, or females, or both, or making whom He wills barren, are frequently quoted at couples to mean stop the treatment. They say who decides the outcome. They do not tell any human being to stop taking means, and if they did, the same logic would forbid eating.
The two reports below are the strongest correction there is. Servants of Allah, use remedies, said in the imperative. And that Allah has not created a disease without creating its treatment.
What this course does not do is rule on any specific treatment. Mainstream contemporary scholarship permits treatment using the gametes of the married couple within the marriage, and third party gametes and surrogacy are a separate and much more contested question. That is your scholar's answer, not ours. Our only job here is to remove the false blocker that seeking help is itself a failure of trust.
Qur’an and Sunnah
ٱلۡحَمۡدُ لِلَّهِ ٱلَّذِي وَهَبَ لِي عَلَى ٱلۡكِبَرِ إِسۡمَٰعِيلَ وَإِسۡحَٰقَۚ إِنَّ رَبِّي لَسَمِيعُ ٱلدُّعَآءِ
Praise be to God, who has granted me Ishmael and Isaac in my old age: my Lord hears all requests
Qur’an 14:39
وَزَكَرِيَّآ إِذۡ نَادَىٰ رَبَّهُۥ رَبِّ لَا تَذَرۡنِي فَرۡدࣰ ا وَأَنتَ خَيۡرُ ٱلۡوَٰرِثِينَ
Remember Zachariah, when he cried to his Lord, ‘My Lord, do not leave me childless, though You are the best of heirs.’
Qur’an 21:89
فَٱسۡتَجَبۡنَا لَهُۥ وَوَهَبۡنَا لَهُۥ يَحۡيَىٰ وَأَصۡلَحۡنَا لَهُۥ زَوۡجَهُۥٓۚ إِنَّهُمۡ كَانُواْ يُسَٰرِعُونَ فِي ٱلۡخَيۡرَٰتِ وَيَدۡعُونَنَا رَغَبࣰ ا وَرَهَبࣰ اۖ وَكَانُواْ لَنَا خَٰشِعِينَ
We answered him––We gave him John, and cured his wife of barrenness- they were always keen to do good deeds. They called upon Us out of longing and awe, and humbled themselves before Us
Qur’an 21:90
هُنَالِكَ دَعَا زَكَرِيَّا رَبَّهُۥۖ قَالَ رَبِّ هَبۡ لِي مِن لَّدُنكَ ذُرِّيَّةࣰ طَيِّبَةًۖ إِنَّكَ سَمِيعُ ٱلدُّعَآءِ
There and then Zachariah prayed to his Lord, saying, ‘Lord, from Your grace grant me virtuous offspring: You hear every prayer.’
Qur’an 3:38
فَنَادَتۡهُ ٱلۡمَلَٰٓئِكَةُ وَهُوَ قَآئِمࣱ يُصَلِّي فِي ٱلۡمِحۡرَابِ أَنَّ ٱللَّهَ يُبَشِّرُكَ بِيَحۡيَىٰ مُصَدِّقَۢا بِكَلِمَةࣲ مِّنَ ٱللَّهِ وَسَيِّدࣰ ا وَحَصُورࣰ ا وَنَبِيࣰّ ا مِّنَ ٱلصَّٰلِحِينَ
The angels called out to him, while he stood praying in the sanctuary, ‘God gives you news of John, confirming a Word from God. He will be noble and chaste, a prophet, one of the righteous.’
Qur’an 3:39
قَالَ رَبِّ أَنَّىٰ يَكُونُ لِي غُلَٰمࣱ وَقَدۡ بَلَغَنِيَ ٱلۡكِبَرُ وَٱمۡرَأَتِي عَاقِرࣱۖ قَالَ كَذَٰلِكَ ٱللَّهُ يَفۡعَلُ مَا يَشَآءُ
He said, ‘My Lord, how can I have a son when I am so old and my wife is barren?’ [An angel] said, ‘It will be so: God does whatever He will.’
Qur’an 3:40
لِّلَّهِ مُلۡكُ ٱلسَّمَٰوَٰتِ وَٱلۡأَرۡضِۚ يَخۡلُقُ مَا يَشَآءُۚ يَهَبُ لِمَن يَشَآءُ إِنَٰثࣰ ا وَيَهَبُ لِمَن يَشَآءُ ٱلذُّكُورَ
God has control of the heavens and the earth; He creates whatever He will- He grants female offspring to whoever He will
Qur’an 42:49
أَوۡ يُزَوِّجُهُمۡ ذُكۡرَانࣰ ا وَإِنَٰثࣰ اۖ وَيَجۡعَلُ مَن يَشَآءُ عَقِيمًاۚ إِنَّهُۥ عَلِيمࣱ قَدِيرࣱ
male to whoever He will, or both male and female, and He makes whoever He will barren: He is all knowing and all powerful
Qur’an 42:50
Usamah bin Sharik said:"Some Bedouins asked: 'O Messenger of Allah (s.a.w) shall we treat (our ill)?' He said: 'Yes, O worshipers of Allah! Use remedies. For indeed Allah did not make a disease but He made a cure for it' - or - 'a remedy. Except for one disease.' They said: 'O Messenger of Allah (s.a.w)! What is it?' He said: 'Old age
Jami' at-Tirmidhi 2038graded sound, albanifull report
Narrated Abu Huraira:The Prophet (ﷺ) said, "There is no disease that Allah has created, except that He also has created its treatment
Sahih al-Bukhari 5678graded sound, sahihaynfull report
Translation: M.A.S. Abdel Haleem, The Qur'an, Oxford University Press, 2004.