You head back to Town, dust yourself off, and go again. GunCrypt follows rogue-like convention: a run ends when the deputy falls, but Town progress, unlocks, and quest advancement persist across every attempt. You lose the build you had assembled, not the ground you've gained.