The Quran's purpose is not a scientific text or natural history book. It is a book of guidance. The narrations about creation mentioned in the Quran are allegorical or metaphorical with very important spiritual meanings.
There seems to be a very common misunderstanding and confusion regarding:
what is "Shahadati" vs "Ghaybi"
knowledge that is "Akil" vs "Nakil"
ayas that are "Mutashâbihât" vs ayas that are "Muhkamât"
Without clarity on these Islamic concepts we will remain in fog, so I shall define below.
I am using Shahadati and Ghaybi as referred in Quran 59:22.
Huwa Allāhu Al-Ladhī Lā 'Ilāha 'Illā Huwa ۖ `Ālimu Al-Ghaybi Wa Ash-Shahādati ۖ Huwa Ar-Raĥmānu Ar-Raĥīm
059.022 God is He, than Whom there is no other god;- Who knows (all things) both secret and open; He, Most Gracious, Most Merciful.
هُوَ اللَّهُ الَّذِي لاَ إِلَهَ إِلاَّ هُوَ ۖ عَالِمُ الْغَيْبِ وَالشَّهَادَةِ ۖ هُوَ الرَّحْمَنُ الرَّحِيمُ
Shahadati: open, evident, tangible, the physical universe, that mankind can observe or potentially observe, measure, and witness.
Ghaybi: unseen, secret, intangible, un-observable, not physical.
The veil of of Ghaybi will not be lifted until Yaum i Deen (judgement day)
Akil: literally means "to flow" signifies causal knowledge that can be obtained through observation (Shahadat), induction, deduction, cause-effect inference, scientific method, historical evidence, etc. Also, universal morals, ethics and values that can be derived from common human conscious, consensus, and rational inference without necessity for divine revelation or prophet.
Nakil: literally means "transported". Knowledge that is transported from Allah indirectly through a "Nabi" (prophet,messenger) to mankind, without which, said knowledge would have remained unknown to mankind forever. Example: How to perform salah
We also must make distinction between ayas that are allegorical vs literal.
Quran 3:7 states that certain ayas are allegorical (mutashâbihât, beyond shabihati) and others are literal (muhkamât):
003.007 He it is Who has sent down to thee the Book: In it are verses basic or fundamental (of established meaning); they are the foundation of the Book: others are allegorical. But those in whose hearts is perversity follow the part thereof that is allegorical, seeking discord, and searching for its hidden meanings, but no one knows its hidden meanings except God. And those who are firmly grounded in knowledge say: "We believe in the Book; the whole of it is from our Lord:" and none will grasp the Message except men of understanding.
هُوَ الَّذِي أَنْزَلَ عَلَيْكَ الْكِتَابَ مِنْهُ آيَاتٌ مُحْكَمَاتٌ هُنَّ أُمُّ الْكِتَابِ وَأُخَرُ مُتَشَابِهَاتٌ ۖ فَأَمَّا الَّذِينَ فِي قُلُوبِهِمْ زَيْغٌ فَيَتَّبِعُونَ مَا تَشَابَهَ مِنْهُ ابْتِغَاءَ الْفِتْنَةِ وَابْتِغَاءَ تَأْوِيلِهِ ۗ وَمَا يَعْلَمُ تَأْوِيلَهُ~ُ إِلاَّ اللَّهُ ۗ وَالرَّاسِخُونَ فِي الْعِلْمِ يَقُولُونَ آمَنَّا بِهِ كُلٌّ مِنْ عِنْدِ رَبِّنَا ۗ وَمَا يَذَّكَّرُ إِلاَّ أُوْلُوا الأَلْبَابِ
The very first surah revealed to our prophet pbuh, Quran 96, emphasizes that the main purpose of the Quran is Nakil.
096.003 Aqra' Wa Rabbuka Al-'Akramu
Proclaim! And thy Lord is Most Bountiful,-
اقْرَأْ وَرَبُّكَ الأَكْرَمُ
096.004 Al-Ladhī `Allama Bil-Qalami
He Who taught (the use of) the pen,-
الَّذِي عَلَّمَ بِالْقَلَمِ
Allama Al-Insāna Mā Lam Ya`lam
096.005 Taught man that which he knew not.
عَلَّمَ الإِنسَانَ مَا لَمْ يَعْلَمْ
Allah sbwtl, in his mercy, has reinforced "akil" with certain ayas like those that prohibit intoxicating drink, eating pork, gambling, usury; all of whose harmful effects have been confirmed by science and "shahadati". As a rule though, as the above sura states, the Quran is about 'Nakil' knowledge.
To answer your question:
We know dinosaurs existed in the Triassic and Jurassic periods of earth's history because this is indirect Shahadati through Akil. We observe (shahadati) their fossilized remains and can date the fossils with isotope proportions and other methods.
Interesting, but what does this have to do with Islam? Using 'Akil' we can reason that like the dinosaurs and other creatures that went extinct, so can the human. And Allah says in the Quran that he can replace us with another creation and this is easy for Allah to do. What we observe in nature and history are also 'ayas' (signs) of Allah but are Shahadati ayas. While the majority of ayas in the Quran are Nakil, and Ghaybi.
The ayas we observe (shahadati) in nature and history, increase our faith in Allah when viewed from the Nakil perspective.
Akil knowledge that is not balanced with Nakil knowledge is un-guided knowledge that can be used for detrimental and evil ways.
A scholar who has accumulated much akil knowledge on top of his nakil knowledge foundation and advises and educates the uma with this is an 'Alim'.
Whereas, one who uses akil knowledge without any foundation or restriction of nakil knowledge will tend rather to be a 'Zalimemphasized text', a tyrant, who does 'zulm' (tyranny) to himself, others, and uma.
Example, theory of evolution infers 'survival of the fittest' and 'might is right'. This lead to theory of social Darwinism which lead to eugenics, racism, ethnic cleansing, colonialism, economic exploitation, even genocide. This is historical shahadati that we must heed.
The theory of evolution is Akil derived from indirect Shahadati whereas creation as described in the Quran is Nakil, Ghaybi (angels,Iblis, Sheythan, Jennah), and Mutashabihat. It is important to make this distinction and not confuse these separate realms of knowledge.