Your question is quite broad, so here's just one option which could have interesting story consequences.
This was an invention of the brilliant Nikola Tesla. It was described as a "peace ray", since he hoped it would ensure peace, even though it wasn't really a "ray": they would be so cheap and deadly that all major cities would build them for protection, but so bulky and unwieldy that they couldn't be moved or used for offense, only defense.
As he described it:
The flying machine has completely demoralized the world, so much that in some cities, as London and Paris, people are in mortal fear from aerial bombing. The new means I have perfected afford absolute protection against this and other forms of attack.
These new discoveries, which I have carried out experimentally on a limited scale, have created a profound impression. One of the most pressing problems seems to be the protection of London and I am writing to some influential friends in England hoping that my plan will be adopted without delay. The Russians are very anxious to render their borders safe against Japanese invasion and I have made them a proposal which is being seriously considered.
My apparatus projects particles which may be relatively large or of microscopic dimensions, enabling us to convey to a small area at a great distance trillions of times more energy than is possible with rays of any kind. Many thousands of horsepower can thus be transmitted by a stream thinner than a hair, so that nothing can resist.
The nozzle would send concentrated beams of particles through the free air, of such tremendous energy that they will bring down a fleet of 10,000 enemy airplanes at a distance of 200 miles from a defending nation's border and will cause armies to drop dead in their tracks.
(Note for the sake of accuracy: this isn't a single quote, the individual paragraphs are taken from different places.)
Tesla tried to sell his concept to both the American and the Soviet governments, as well as several others, and during the Cold War there was quite a bit of research which bore a striking resemblance to Teleforce. (The Soviets are known to have given him a $25,000 grant for it.)
In real life it didn't pan out, but in your story, Teleforce could have been built during Tesla's lifetime, or perfected at any point later. Nowadays the idea is generally considered unfeasible, but Tesla said in 1937 that "I have built, demonstrated and used it. Only a little time will pass before I can give it to the world." He never put his full designs on paper because of the risk of espionage…perhaps he had some breakthrough which nobody has yet rediscovered?
The main body of a teleforce weapon would be a vacuum chamber, with one end open to the atmosphere. Particles of material would be accelerated to ridiculous speeds inside the chamber, then ejected out through the nozzle. Quite a lot of machinery would be needed to maintain the vacuum, inject the particles, and aim the resulting stream…not to mention supplying all the energy.
Depending on the needs of your story, the whole device might be building-sized or larger, or closer in scale to a conventional cannon. But the energy needs are phenomenal, and this is the major limitation compared to conventional artillery. Whatever size it is, the device will generally have to be fixed in one place. It would generally be a defensive weapon, built in a major city to protect against invasion and bombing—not something brought to the front lines. And it would only be effective for about 200 miles due to the curvature of the Earth. Any farther, and it would continue into space. (Tesla suggested this as a peacetime use of the device: generate artificial auroras for lighting!)
The PBS page here has some more fun information on the history of his invention. There's also quite a bit of technobabble you could throw in, such as "gas focusing" (also used in vacuum tubes!) and "electrostatic repulsion"