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:23

And the pains of childbirth drove her to the trunk of a palm tree. She said, "Oh, I wish I had died before this and was in oblivion, forgotten."  

And the birth pangs, the pains of childbirth, brought her to the trunk of the palm-tree, that she may support herself against it, and then she gave birth: the conception, formation ˹of the foetus˺ and delivery ˹all˺ took place within one hour. She said, ‘O (yā is ˹used˺ to call attention ˹to something˺) would that I had died before this, affair, and become a forgotten thing, beyond recall!’, a thing abandoned which no one knows or mentions.
القرآن:١٩:٢٣

فَأَجَاءَهَا الْمَخَاضُ إِلَىٰ جِذْعِ النَّخْلَةِ قَالَتْ يَا لَيْتَنِي مِتُّ قَبْلَ هَٰذَا وَكُنْتُ نَسْيًا مَنْسِيًّا  

{فأجاءَها} جاءَ بها {المخاض} وجع الولادة {إلى جذع النخلة} لتعتمد عليه فولدت والحمل والتصوير والولادة في ساعة {قالت يا} للتنبيه {ليتني متُّ قبل هذا} الأمر {وكنت نسيا منسيا} شيئا متروكا لا يعرف ولا يذكر.