Dinosaurs are famous for being gigantic, although not all of them were as large as the most famous kinds. The smallest ones were no bigger than a turkey.
However, being large may well have helped the plant-eaters, because the tree needles and fern leaves they ate were poor in nourishment. So they had to eat lots and get every last bit of nourishment out of it. A larger animal with a longer gut can do this better than a smaller one, so this may be one reason why plant-eaters were large.