We know Stormtroopers don't fare well against non-energy weapons (or energy weapons for that matter). Many examples of it in Return of the Jedi, Book of Boba Fat, Andor, etc
If it helps, don't think of them as space nazis in snazzy outfits and view them as space Russkies instead. Throw scores...