Repair your weapons and armor with Weapon/Armor PartsYou can repair your weapons and armor in The Outer Worlds at any point, but you will need to find a Workbench to be able to do it yourself. Just head to any Workbench (usually found in all cities, and even on The Unreliable in the main cargo room) and select the "Repair" menu there. Now choose the item(s) you want to repair and pay.
Repairing your weapon requires you to use Weapon Parts, while repairing your armor requires Armor Parts. You get these from breaking down weapons and armor that you don't intend to use.
And by the way, there's a button you can choose that will repair all equipped items, which can save you a bit of time.