Below is a brief history of the compilation of the Quran based on Hadith literature. This is not meant to be taken as fact, but merely to understand the history of the compilation of the Quran based on compilers of Hadith.
During Muhammad’s Life
During Muhammad’s life, it is stated in Hadith that he had multiple scribes to write down the Quran as well as a personal written copy of the Quran for himself that he would keep. Additionally, it is also stated that four other people had also gathered the Quran during his life.






After Muhammad’s Death
It is stated that when the prophet died, he left only the Quran, while another narrative states that he also left a piece of paper that condemned Hadith. More details regarding that Hadith can be found here.



During the Caliphate of Abu Bakr (Suhuf)
After the Battle of Yamma there were concerns that since a number of the memorizers of the Quran, Qurra, were lost that this could impact the preservation of the Quran. So because of this, Aub Bakr and Umar commissioned Zaid bin Thabit to compile the Quran into a written copy in the order described by the prophet.
Zaid bin Thabit undertook this process by collecting all the verses of the Quran from all the written fragments and from the chest of the people who memorized the verses of the Quran. It was during this process that it was discovered that the only soul that knew of 9:128-129 was Khuzaima. This implies that no one else at the time could have claimed to have memorized the entire Quran, as no one else knew these two verses.



During the Caliphate of Uthman (Mus’haf)
During the Caliphate of Uthman, there were disputes regarding the recitation of the Quran between the various regions where Muslims resided. In response, Uthman again commissioned Zaid bin Thabit to take on the task of creating a select number of canonized manuscripts (mus’hafs) of the Quran to be delivered to the various Muslim regions.
After completion, these mus’hafs were compared against the manuscript (suhuf) during the original compilation under Abu Bakr which at the time was with Hafsa, Muhammad’s wife and Umar’s daughter. After Abu Bakr’s death, the suhuf was passed on to Umar, and then after Umar’s death to Hafsa.
Additionally, these manuscripts were written in the Quraish dialect and did not contain any diacritical marks, but were sent with an approved professional reciter (Qurra) to each of the respective regions. The idea was that all manuscripts of the Quran that people had for themselves were to be destroyed if they conflicted with the mus’haf provided by Uthman. Despite this decree, it is believed that some people just updated their manuscripts to match the Uthman’s mus’haf or hid their manuscripts rather than having them destroyed.

It was during this compilation of the mus’hafs of the Quran, that Zaid bin Thabit was looking for verse 33:23, and found it with Khuz’ima. From the Hadith, it is clear that Zaid bin Thabit not only was able to recollect and recite the verse, but even had it from the previous suhuf compilation of the Quran under Abu Bakr. This implies that Zaid bin Thabit was not looking for confirmation of this verse, but the physical copy of it.




Umayyad Dynasty
After the Rashidun Caliphate, Umayyad caliph Marwan ibn al-Hakam (d. 105 AH) had the suhuf left in the custody of Hafsa destroyed thinking that people might start doubting it. This is according to Ibn Abi Da’ud, Kitab al-masahif, 32.