﴿فَإِن كُنتَ فِي شَكٍّ مِّمَّا أَنزَلْنَا إِلَيْكَ فَاسْأَلِ الَّذِينَ يَقْرَؤُونَ الْكِتَابَ مِن قَبْلِكَ لَقَدْ جَاءكَ الْحَقُّ مِن رَّبِّكَ فَلاَ تَكُونَنَّ مِنَ الْمُمْتَرِينَ﴾ (يونس: 94)
94 - If you are in doubt about the revealed stories to you such as the story of the Pharaoh with Moses or the news of the Children of Israel, ask the truthful people who read the Torah and the Bible, for it is recorded in their books. Verily, the true revelation, the truthful news, and the sealing religion came to you, so do not hesitate or doubt.
The Messenger of Allah (peace be upon him) did not doubt and did not ask, but the Ayah sustains his situation and warn Muslims to follow that approach. Ayahs were revealed to Him in Makkah while he was facing harm and hardships from his people, and many people from among those who believed in him reverted to their first religion after the incident of Isra'.
﴿وَلاَ تَكُونَنَّ مِنَ الَّذِينَ كَذَّبُوا بِآيَاتِ اللّهِ فَتَكُونَ مِنَ الْخَاسِرِينَ﴾ (يونس: 95)
95 - O Messenger, do not be of those who belied the Ayahs and proofs of Allah so that you would a loser.
This is not expected from the Messenger of Allah (peace be upon him), but it is frightening and intimidation, and a chance for those who doubt to ask and make sure of his creed instead of belying.
﴿إِنَّ الَّذِينَ حَقَّتْ عَلَيْهِمْ كَلِمَتُ رَبِّكَ لاَ يُؤْمِنُونَ﴾ (يونس: 96)
96 - Those who do not follow the causes of guidance shall not be guided and whoever closes the windows of his heart so as not to receive the light and guidance of faith shall not be guided. Allah knew what is there in their hearts, so He sealed their hearts and caused them to die as disbelievers.
﴿وَلَوْ جَاءتْهُمْ كُلُّ آيَةٍ حَتَّى يَرَوُا الْعَذَابَ الأَلِيمَ﴾ (يونس: 97)
97 - If clear proofs had come to them, miracles revealed to them, and decisive evidence refuted their claims, they would have not believed until the painful torture comes to them. Then they shall believe but at that time their faith shall not benefit them.
﴿فَلَوْلاَ كَانَتْ قَرْيَةٌ آمَنَتْ فَنَفَعَهَا إِيمَانُهَا إِلاَّ قَوْمَ يُونُسَ لَمَّا آمَنُوا كَشَفْنَا عَنْهُمْ عَذَابَ الخِزْيِ فِي الْحَيَاةَ الدُّنْيَا وَمَتَّعْنَاهُمْ إِلَى حِينٍ﴾ (يونس: 98)
98 - Would the people of villages, who were mentioned previously, believe before torment comes to them and their faith would be of no avail? People shall not benefit from their faith when torment comes except the people of Jonah (peace be upon him). When they believed upon seeing the signs of torment, we removed the torment which would have destroyed them in the world and they were left to enjoy life again until they die naturally.
﴿وَلَوْ شَاء رَبُّكَ لآمَنَ مَن فِي الأَرْضِ كُلُّهُمْ جَمِيعاً أَفَأَنتَ تُكْرِهُ النَّاسَ حَتَّى يَكُونُوا مُؤْمِنِينَ﴾ (يونس: 99)
99 - If Allah wills, the whole people shall be believers but He (Glory be to Him) leaves the choice to them to choose the freedom of faith and choice after He had provided them with reason and showed them the path of goodness and evil and to be responsible for their choices. O Prophet, will you force the people to believe while Allah did not? The matter is not due to you.