Most manufacturers recommend taking two key steps to maintain your handgun slide (and the other components in your pistol):
Regular cleaning – You should (at the very least) wipe down your pistol after each use. Occasionally, you should take your pistol apart and clean each individual component to prevent unnecessary wear and tear.
Oiling – Manufacturers suggest greasing your pistol’s slide, barrel, and grip frame after taking it out of the box and after each use (or once a month, if you don’t get many range opportunities).