Does the Quran Allow Child Marriage?

It is disputed if the Quran allows child marriage.
This passage is used as evidence both for and against it:
وَٱلَّـٰٓـِٔى يَئِسْنَ مِنَ ٱلْمَحِيضِ مِن نِّسَآئِكُمْ إِنِ ٱرْتَبْتُمْ فَعِدَّتُهُنَّ ثَلَـٰثَةُ أَشْهُرٍۢ وَٱلَّـٰٓـِٔى لَمْ يَحِضْنَ ۚ وَأُو۟لَـٰتُ ٱلْأَحْمَالِ أَجَلُهُنَّ أَن يَضَعْنَ حَمْلَهُنَّ ۚ وَمَن يَتَّقِ ٱللَّهَ يَجْعَل لَّهُۥ مِنْ أَمْرِهِۦ يُسْرًۭا ٤
“As for your women past the age of menstruation, in case you do not know, their waiting period is three months, and those who have not menstruated as well. As for those who are pregnant, their waiting period ends with delivery. And whoever is mindful of Allah, He will make their matters easy for them.”
(Surah 65, verse 4)
This passage refers to circumstances of divorce, and how long a woman is allowed to wait in the house before the man makes divorce formal and kicks her out.
The waiting period serves 2 purposes: 1. It gives a cooling period for emotions, so that the man does not divorce in rage, and 2. Makes sure that the woman is either not pregnant or gives birth before leaving. The man has single right to the child, but he has the privilege to retain the mother as "nurse" for compensation - or not.
The Context of Sharia
Those who claim the Quran does not allow child marriage claims this passage pertains to menopausal women, and before that, to post-menopausal women.
But this is an entirely modern interpretation, not older than the 20th century.
This is evidenced by sharia legal traditions, that have interpreted this verse as referring to child brides.
Ibn Kathir’s highly respected commentary on the Quran has this to say about this passage:
“Allah the Exalted clarifies the waiting period of the woman in menopause. And that is the one whose menstruation has stopped due to her older age. Her ‘Iddah [waiting period before marriage] is three months instead of the three monthly cycles for those who menstruate, which is based upon the Ayah in (Surat) Al-Baqarah. [see 2:228] The same for the young, who have not reached the years of menstruation. Their IIddah is three months like those in menopause.”
The reference to ‘Surat Al-Baqarah’ means Surah 2 verse 228 of the Quran which states that divorced women must wait through three menstrual periods before remarrying. Ibn Kathir also refers to two hadiths or traditions of Muhammad that claim Surah 65:4 was revealed to him when someone asked Muhammad about the young, the old and the pregnant, because their waiting period could not be determined from the principle of three menstrual periods, as given in Surah 2: 228.

Mohammad is the Perfect Human, the Role Model of All Men
Islam is not just based upon the Quran. It is also based upon the example and teaching of Muhammad (who is considered the most perfect human being), and by making him the most perfect role model there is very clear support for what we today would call pedophiliac marriages, because Muhammad married Aisha when she was six and consummated this marriage when she was reported to have been nine years old (that is nine lunar years, which means she was aged somewhere between 8 years, nine months and 9 years, nine months).
The respected Sahih al-Bukhari, which is a collection of sayings of Muhammad, includes a chapter with this heading:
“Giving one’s young children in marriage (is permissible) by virtue of the Statement of Allah '… and for those who have no courses (i.e. they are still immature) (65:4). And the ‘Iddat for the girl before puberty is three months (in the above Verse).”
This chapter consists of the following hadith:
“64. Narrated ‘Ā’isha that the Prophet married her when she was six years old and he consummated his marriage when she was nine years old, and then she remained with him for nine years (i.e. till his death).”
Conclusion
Collections of hadiths are arranged for legal purposes. The heading of each chapter indicates the relevance of the hadiths it contains for jurisprudence. In this case, referencing Sura 65:4, a hadith about the marriage of Aisha, is taken as evidence that it is permissible for a father to marry off his young daughters, specifically if she has not yet reached puberty.
That pre-modern Muslims correctly understood the Quran to allow child marriage, is also attested by the centuries-old custom of marrying pre-pubescent girls off to older men, practiced historically in all Muslim communities. But that is a larger subject.