The main thing you need is to have an extensive understanding of their genome and how to modify them. In Jurassic Park they were always clear the dinosaurs had mosaic genomes with lots of different things spliced in.
Presumably the scientists recognized the potential of dinosaurs and so worked extremely hard to understand how to modify them for human use and pleasure. They don't have a similar understanding of the genomes of, say, elephants, and so it's easier to use dinosaurs.
Make them an invasive pest
Smaller ones, like velociraptors, might be useful to insert into a place where you want to hurt others. You might find they are especially effective at taking over a region, and program them to only attack areas without a particular scent.
Then, your soldiers can shoot enemies who have had their supplies and land ravaged by velociraptors.
Make them pack animals
Animals are much better at navigating rough terrain than vehicles. In wars with enemies in very rough terrain specially bread giant dinosaurs could help supply troops.
Whoever has the bigger guns and ammo wins the war, and the person with the biggest dinosaur can carry the most ammo.
Make them stealthy flying assassins
Big guns sadly can kill big dinosaurs, so they are not reliable weapons of war.
But, flying dinosaurs are very hard to hit. Have Pterosaurs there to scratch with a poisonous hand enemies. They can at night harass troops and pick up and eat isolated ones.
Animals can move a lot more stealthily and cheaply than helicopters.