Answer:

And you shall take for yourself of all food that is eaten, and you shall gather it to yourself; and it shall be food for you and for them (Genesis 6:21).

Genesis 7:5, 8:1

Often we wish the Bible would give us more details, don’t we? But, we know from our verse that God said to take food on board. It could be that God told Noah exactly what to take, but it just wasn’t written down. It is also possible that Noah, who was almost 500 years old when God told him about the Flood, knew a lot about animals, like what and how much they needed to eat. Noah was, after all, very intelligent—smart enough to build the ark. 

The animals couldn’t have been as active while they were on the ark. You know, no more running, playing, swimming, chasing each other (they were on a boat, after all). So, I’m thinking they wouldn’t have needed as much food to stay healthy and keep their bodies functioning properly. Again, we don’t know what Noah did for sure, but I’m confident that Noah knew exactly what to bring and exactly how much to bring.

Source: https://answersingenesis.org/kids/noahs-ark/did-noah-have-to-estimate-how-much-food-to-gather/