Gu An did not directly kill the Great Infinite Demon Ancestor; he was searching through the Great Infinite Demon Ancestor's memory and cause and effect.
The universe opened up by the Great Infinite Demon Ancestor was not as he imagined. In his early stage of becoming a Saint, he had gone to a mysterious place to listen to Dao, where he met the Taoist Master and conceived the idea of the universe.
His universe was essentially an imitation, which means that other Earths exist.
As a Saint, the Great Infinite Demon Ancestor's memory was vast, more substantial than all the ages and history of the Heavenly Dao combined.
Even for a Saint, consuming another Saint's memories requires time and effort. However, Gu An surpasses a Saint as an Infinite Supreme Saint, making absorbing a Saint's memory no difficult task.
Gu An succeeded in digesting the Great Infinite Demon Ancestor's memory after sitting for just a while.