I don't think it's exactly a hot take to say that the rules in 5e D&D for firing vehicular weapons, whether we're talking conventional seafaring vessels from Ghosts of Saltmarsh or the spelljammers from the Astral Adventurer's Guide, are serviceable but not particularly exciting or dynamic. One thing that bothers me is that these weapons work the same way no matter who happens to be firing them. Individual skill isn't taken into account by the rules at all.
A side effect of that is that it's often better for a character to use their regular attacks, spells, and abilities than it is to use shipboard weapons. That's lame; the shipboard weapons are there to be used, so they should be more attractive options.
The rules below aim to take the talent and experience of the people manning the weaponry into account. This gives the players a chance to show off the expertise of their characters, but it also gives you a reason to have enemy and allied vessels with crack teams of seasoned mariners and spacefarers that are better than any standard-issue crew.
Siege Weapon Attack Rolls and Vehicular Weapon Attack Rolls
Each weapon, such as a ballista, canon, or catapult, has a ranged attack bonus in its stat block. If the person who fires the weapon has a higher ranged attack bonus than the weapon's standard bonus, use their personal attack bonus instead.
Additionally, if the creature who fires the weapon has a Dexterity bonus, add it to the damage dealt by the weapon.
Note: You may wish to restrict the ability to substitute a character's ranged attack bonus for the weapon's ranged attack bonus to characters who are either proficient in martial weapons or who possess the relevant Vehicles proficiency.
If a creature operating a siege or vehicular weapon and have the Extra Attack feature, each of their allowed attacks counts as an action toward loading, aiming and firing the weapon. For example, a fighter with three attacks per round from the Extra Attack can use their three attacks to load, aim, and fire a ballista on their turn.
The attack roll to crash a spelljammer or other vehicle into another object is a d20 + the pilot's Dexterity modifier and their proficiency bonus if they possess the appropriate Vehicles proficiency.
Note: I could probably be talked into using Intelligence or Wisdom modifiers in place of Dexterity.
Ramming and Other Melee Attacks
If the creature who uses a ram, such as the hammerhead ship's blunt ram, or a similar weapon, such as the scorpion ship's claws, has a higher melee attack bonus than the weapon's standard bonus, use their personal attack bonus instead.
Note: You may wish to restrict the ability to substitute a character's melee attack bonus for the ram's melee attack bonus to characters who possess the relevant Vehicles proficiency.
I would allow ships to be repaired when not berthed. Furthermore, I would remove the "repairing 1 hit point of damage to a ship takes 1 day" stipulation: you can restore 1 hit point per 20 gp spent per day, providing that laborers capable of performing the repairs are available to do the work.
I'd rule that anyone proficient in carpentry or smithing would be capable of performing repairs, depending on what the ship is made of. I might even expand that to anyone proficient with the kind of Vehicle in question.
I imagine that docks would might offer spellcasters capable of casting mending to help speed alone the process, so determining what they charge for that service would be helpful here. 50 gp a casting seems about right to me.
If nothing else, keeping a ship repaired might be a decent way to keep characters hungry and in search of loot.
* * *
The items below are things I'd like to continue to think about and work on:
I'd like to work more on positioning rules to give the pilot at the spelljammer helm more to do.
I don't know why, but there aren't a lot of canons on spelljamming ships. I'd probably replace a lot of the mangonels with canons when I run a Spelljammer campaign.
Magical Weapon Options
The lack of magical shipboard weapons in the Spelljammer book feels like a real missed opportunity. This is D&D we're talking about, why wouldn't there be lightning canons or acid hurlers or eldritch machine guns?
If I were running a Spelljammer game, I'd definitely invent some bespoke magical spelljammer weapons. Adapting some of the weapons from the infernal war machines in Descent into Avernus would be a start.
My gut instinct is that magical shipboard weapons could use ranged attack bonuses as above, but also might be able to substitute ranged spell attack bonuses as well to give spellcasting characters more to do during ship combat.
Frankly, options to customize your ship is a huge part of the fantasy of owning one in the first place so it's a tremendous dropping of the ball that they couldn't find space or the inspiration to add the options to the Spelljammer set.
(Note: I've largely abandoned this tangent as I probably won't be running a Spelljammer game anytime soon, but I'm posting them anyway in hopes that they are useful to someone, somewhere.)