The answer
First:
the Genesis account mentions ‘species’ rather than ‘types’ of animals and any one species has many different types of animals.
Of the birds after their kind, of animals after their kind, and of every creeping thing of the earth after its kind, two of every kind will come to you to keep them alive. (Gen 6:20)
Second:
Most of the living creatures can live in water or remain in the egg form, which would hatch much later on. Third:
The measurements of the ark, mentioned in Genesis, are those of a very large vessel, similar to a floating city with three levels (Genesis 6:15 - 16) with a total area of 1,500,000 cubic feet.
Fourth:
It makes sense to expect that some animals entered the ark while still very young and small and got bigger during their stay in the ark until they were released afterwards.
Fifth:
Scientifically, most dinosaurs are small in size, contrary to their size as portrayed in movies. Many of them were even able to swim. The flood dates back to around 2500 B.C. and maybe later. There is no documentation of dinosaurs beyond that time.
Fr. Daoud Lamei