With the conquests of the Caliphates, the Muslims managed to take control over multiple regions. One of those regions was North Africa, where in Egypt, in the city of Alexandria there were millions of books with scientific and philosophical themes. It was the center of knowledge of the world in that time.
The Muslims unfortunately destroyed most of the books from the antiquity, and only few were preserved. Thus few though got into the hands of Muslim scholars that were interested in science and philosophy. They read them carefully and started to base their researches on them, making significant progress and discovering multiple things. By preserving these few books, and also upgrading on their basis, helped to preserve at least some part of the ancient knowledge, which later was reintroduced in its place of origin, Europe.