Oleran said:
In a fantasy world you could just stick one of these in a soldier's hands and construct some kind of worldbuilding rule around it...but realistically, that seems pretty unrealistic?
There are a couple of tools for sci-fi authors,
@Oleran, that suit your situation well.
Handwavium is as the name suggests, some kind of plot device where you essentially duck any attempt at actual physics and provide just enough technobabble to make it seem plausible. Many tropes are established that assist with this, including handheld weapons of ridiculous power. A handheld railgun is not even an imaginative stretch, to be honest, and I use one in the story I'm just about finished (yay!) with a mere paragraph of detail to make it seem plausible:
"Tin’s armory was very much as I had expected. There was no plasma cannon, but there was a nifty short-barreled rifle that used some fancy electronics to shrink a linear accelerator into a portable package that fired tiny slugs of gadolinium at about five times the speed of sound with only a slight whine to give the attacker away. The rifle traded bullet mass for muzzle velocity allowing for a much larger magazine than you would normally have with an automatic weapon of similar size. Tin dived into technical detail about gadolinium’s powerful magnetic moment, unpaired electrons, long electron-spin relaxation time, and something about symmetric S-states, while assuring me that the capacitor would last for our intended engagement, but I kept my skeptical face in place because until I tried it, I refused to believe it."
The other tool is
unobtanium, which is some kind of impossible material that you use to glue your narrative together. Think of what makes a space elevator possible, and you're into unobtanium territory. Graphene is often presented in an unobtanium way, but it can be as exotic as force fields or as mundane sounding as Neal Asher's chainglass, which is an impossibly strong version of glass that has all sorts of fun uses in his novels. My current favorite is metallic hydrogen, which (of course

) I also use in my story:
"Now, Eric was racing sunward, eight prodigious engines copiously liberating their metallic hydrogen fuel stocks to boost four hundred billion-odd tons of mass toward Earth at sixty klicks a second. I’d calculated the force being generated to achieve that little trick, and it was staggering. Tin was blithely talking about engines that could keep the lights on in a mid-sized country for a decade. It was staggering what you could do with limitless solar power, an endless ocean of raw materials, and Egan-era technology. In ninety days, Eric would gently roll over and that exceptional thrust would be applied to shed just over half our speed and match Earth in its orbit. Tin had assured me we would not notice this, just as we could not notice our current acceleration, because against that much mass, the applied force was barely two-tenths of a gee."
The thing is though, if your characters are boring and your narrative uninteresting, then all the handwavium and unobtanium won't save your novel from being a stinker. So that's the thing to get right, the scicene-ish aspect needs to
support the plot, not generally
be the plot.