You can't block a high caliber sniper rifle round.
Says who? I doubt no wizards have developed a spell to shield against bullets. And I think JK Rowling would agree if she ever happens to write this scenario.
The time it takes to pull the trigger is way shorter than the time it takes to cast a spell in Harry Potter.
Spells require a wand, a vocal component, and a somatic component. You have to move the wand and you have to speak the words, if you say the magic words wrong the spell won't work.
A gun requires you to pull the trigger. One quick finger movement.
And considering the scenes we've seen in some of the books where Harry blocks an avada kedavra death spell with an old shield, a fully armored medieval knight could easily block a wizard's spell, and if he's fast enough at sprinting he can drive his sword through the wizard's chest before the wizard can cast a second time. Because rate of fire is limited by how fast you can say AVADA KEDAVRA!
Now compare that to a machine gun's rate of fire.
Or a grenade launcher. There are no spells in Harry Potter that have splash damage like a grenade.
Wizard army vs modern military in Harry Potter would end with the wizard army being shot to pieces. And by "modern military" I mean anything from 1900 onwards, your average WW1 army would make short work of them.
Which is why wizards are so reclusive and hide from the world at large.