Yes. Gunpowder is the most energy efficient way to do this, but it’s far from the only option. Gauss and pneumatic weapons both come to mind off hand.
Pneumatic weapons are actually pretty common, and cheap. Airguns are usually viewed as toys, and in some cases they actually are, but more powerful ones, do exist.
The concept is fairly simple, and (when it comes to the physics involved) remarkably similar to conventional firearms. With gunpowder, you ignite the powder, that burns, and the expanding gasses force the bullet down and out the barrel. With an airgun, you skip the powder, and go straight to injecting gasses behind the bullet to force it into motion.
Most commercial airguns are very low power, to the point that you wouldn’t usually think of these as practical weapons. However, they are, and have been used historically in that capacity. They’ve also posed a significant advantage over conventional firearms because they are much quieter.
Gauss weapons or railguns are another real alternative. It’s not currently possible to make these man portable, but they do exist as ship mounted weapons.
Unlike with a pneumatic or gunpowder weapons, these get the projectile moving through the use of an electromagnetic field. Which accelerates a small projectile to hypersonic speeds.
The amount of energy needed to fire these things is substantial, and battery technology required for handheld variants just isn’t there yet.
To be fair, if you don’t care about lethal, or are using a sharpened projectile, anything from rubber bands to heavy springs can get a projectile moving. It wouldn’t be enough to kill someone, but if all you want to do is bounce a toothpick off someone who’s annoying you, a rubber band will do the job.
I should probably also point out, “gunpowder” isn’t really just one specific mixture. Historic “gunpowder” is now refereed to as “black powder” and is relatively low power. Smokeless powders (developed in the 19th century) burn more cleanly (which is very important for more mechanically complex firearms), deliver more force, and are substantially louder.