Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:19:20

She said, "How can I have a boy while no man has touched me and I have not been unchaste?"  

She said, ‘How shall I have a boy when no human being has ˹ever˺ touched me, by way of conjugality, neither have I been unchaste?’, ˹neither have I been˺ a fornicator.
القرآن:١٩:٢٠

قَالَتْ أَنَّىٰ يَكُونُ لِي غُلَامٌ وَلَمْ يَمْسَسْنِي بَشَرٌ وَلَمْ أَكُ بَغِيًّا  

{قالت أنَّى يكون لي غلام ولم يمسسني بشر} يتزوج {ولم أك بغيّا} زانية.

See similar narrations below:

Collected by Ḥākim
hakim:3412Muḥammad b. ʿAlī al-Shaybānī Bi-al-Kūfah > Aḥmad b. Ḥāzim al-Ghifārī > ʿUbaydullāh b. Mūsá > Abū Jaʿfar al-Rāzī > al-Rabīʿ b. Anas > Abū al-ʿĀliyah > Ubay b. Kaʿb

[Machine] "She said, 'How can I have a son when no man has touched me and I have not been unchaste?' [Maryam 20] So she conceived him, and she withdrew with him to a remote place."  

الحاكم:٣٤١٢أَخْبَرَنَا مُحَمَّدُ بْنُ عَلِيٍّ الشَّيْبَانِيُّ بِالْكُوفَةِ ثنا أَحْمَدُ بْنُ حَازِمٍ الْغِفَارِيُّ ثنا عُبَيْدُ اللَّهِ بْنُ مُوسَى أَنْبَأَ أَبُو جَعْفَرٍ الرَّازِيُّ عَنِ الرَّبِيعِ بْنِ أَنَسٍ عَنْ أَبِي الْعَالِيَةِ عَنْ أُبَيِّ بْنِ كَعْبٍ قَالَ كَانَ رُوحُ عِيسَى ابْنِ مَرْيَمَ مِنْ تِلْكَ الْأَرْوَاحِ الَّتِي أُخِذَ عَلَيْهَا الْمِيثَاقُ فِي زَمَنِ آدَمَ فَأَرْسَلَهُ اللَّهُ إِلَى مَرْيَمَ فِي صُورَةِ بَشَرٍ {فَتَمَثَّلَ لَهَا بَشَرًا سَوِيًّا} [مريم 17]

{قَالَتْ أَنَّى يَكُونُ لِي غُلَامٌ وَلَمْ يَمْسَسْنِي بَشَرٌ وَلَمْ أَكُ بَغِيًّا} [مريم 20] فَحَمَلَ الَّذِي يُخَاطِبُهَا فَدَخَلَ مِنْ فِيهَا  

«هَذَا حَدِيثٌ صَحِيحُ الْإِسْنَادِ وَلَمْ يُخْرِجَاهُ» صحيح