Another thing to consider - I forget who first wrote about it, where there was an all-out shooting war on an asteroid. When the two sides finally declared a truce, someone broke the truce and shot an opposing soldier within minutes - until they figured out that all the ammunition they had fired off had created a cloud of bullets orbiting the asteroid and basically rendering it unusable.
That’s the problem in space with kinetic weapons and debris from explosions - if this is a regularly travelled space lane, or the resulting orbit of the debris intersects one, you’ve just planted a ticking time bomb for all future flights. At least when the Chinese tested a killer satellite in earth orbit, the resulting mess of pieces will eventually (! Eventually!) decay and fall to earth. I would think that energy weapons and focussed subatomic particle beams would be more effective, less likely to produce a hazardous mess, and harder to defend against. As an alternative, a neutron bomb or EMP bomb set off nearby would be incredibly effective in making a vessel a non-threat without creating a mess. IIRC from discussions about protection from solar flares, radiation protection generally consists of feet of heavy solids - impractical in space.
Presumably bombs would be shrouded in stealth tech to avoid being seen; and the appropriate defence would be energy weapons like lasers to slag any incoming ordnance. Not sure how you could fit a long weapon in a short spacecraft; instead, I assume there would be extremely long ships (dreadnoughts? candelabras?) to provide artillery support from the rear - where the problem is aiming, once ships are a significant part of a light-second or more apart. A key piece of tech would be the predictive aiming AI - where will the enemy ship be when the beam reaches them? Alternatively the “cannon” would be “shore batteries”, support artillery buried in the local large planetoid or moon. Remember, in space, the impact of an energy weapon would not degrade with distance, except for the “spread” factor. OTOH, with a heavenly body as a backdrop one could safely use kinetic weapons and be assured the debris will (should?) be collected because it all hits the ground.
Also as a fun extra - Google for and read up on immersing lab rats and humans in liquid Freon with a high oxygen content. Basically make the passenger compartment (or personnel cocoons) a bath with a medium approximately the same density as water and human bodies. This would allow the craft to perform extremely high-G maneuvers without squashing the occupants. So the energy weapon aiming AI is in an arms race with hyper-maneuverable vehicles able to dodge with unpredictable course changes. But… avoid the stealth neutron bomb MIRV’s.
OTOH, I am totally skeptical of such a scenario because space would be, like the earth, a sitting duck for nuclear destruction. The same scenario of Mutual Assured Destruction would likely be applicable in space. Anything big enough to be a viable home base is a sitting duck for a barrage of nuclear weapons, not to mention the rest of the supply chain; and any outbreak will result in extreme annihilation once everyone is fully armed. Where do the soldiers’ families live? Where’s the massive industry to build atomic bombs by the thousands, with the complex refining required to purify isotopes? Where is the uranium coming from? IANAAstronomer but it seems to me only the heavy planets have the differentiated cores that allow for large veins of uranium. And so on…
So often sci-fi like old time adventure ignores the basic details. Think through and answer these details to make your story more realistic. For example… If you have a city in the desert - where does it get water? Food for ten thousand or a hundred thousand? A city in the jungle also needs fields instead of jungle commensurate with its population size. So it’s the same in space - several problems loom. We flip on lights and computers and forget how much energy we are using; in space, every piece of energy has a price. Look at the size of the ISS solar panels to feed 6 people. If we use nuclear power instead - most current (sorry!) designs for power generation still need to shed excess heat. Industrial processes on earth shed a lot of heat 9and waste material). Plus, once you get out to the asteroid belt and Jupiter, solar power is nowhere near as strong as near Earth’s orbit.
you might say this is a proxy war, a form of Vietnam - the Earth powers are happy to fight it out in space and not touch home. However, making a mess in high earth orbit risks destroying satellites upon which everyone depend. Bullets in the Mekong delta did not impact the USSR or USA - bullets in geosynchronous earth orbit hurt everyone eventually.
I’m not saying it won’t work. I’m just saying, don’t forget to take into account and explain the dynamics of how all this works. Plus wars are expensive. A three-year orgy of destruction in middle Europe left it in ruins and took over two decades to clean up. That’s war… a short massive destructive phase, followed by many years of picking up the pieces.