On-foot combat in Odyssey is… not great, and none of the vehicles (Ship, Fighter, SRV) feel designed for combat in settlements.
I discovered this strategy during the Azaladshu independence CG, after testing out different loadouts and vehicles.
What you need to do:
Any ship, the more maneuverability and hardpoints (size 1-3), the better. I use an unengineered Krait Mk. II (roughly this), but I have also done it with a Keelback and a Crusader. IMO what is key is good hardpoint placement, as you will be firing dumb rockets. You could probably do this in a sidewinder if you really wanted.
Fill all the hardpoints with dumbfire rockets. I have not tried any of the powerplay weapons, but packhounds seem like they'd be good. You could choose to use one or two slots for laser/thermal weapons if you want to try and take down enemy dropships, but in my experience, its not worth it.
A list of the nearest wars and civil wars to you, such as inara.cz's database. I recommend picking one with a starbase as close as possible to a planet.
Once you have found and travelled to an appropriate station, get out of your ship and walk to the Frontline booth. Find the nearest ground combat zone, mark it down, and return to your ship.
Once you win the engagement (5-15 mins), land your ship and relog.
repeat until you reach desired amount of money and/or ad nauseam.
It is not the best money in the game, of course, but it can be a fun and unconventional way to make some quick spacebucks. It is also almost entirely risk-free. I have never been shot down by ground troops or settlement defenses (which are usually/always offline in combat zones). The main risk is crashing your ship into the ground when you get an IRL phone call, or getting interdicted on your way back.