Reliability is absolutely critical for an every day carry pistol.
Take care of the pistol like your life depends on it, someday it may.
A reasonable minimum schedule to take it down for cleaning, lube, and a maintenance check is at least once a month. In sweaty conditions, wipe it down at end of the day. Remove it from the holster so the holster can dry out overnight. If out in dirty or dusty conditions, a quick field strip, blast with Gun Scrubber and quick lube can be done in 10 minutes to avoid Murphy’s law - anything that can go wrong, will.
Rotate the ammo and put in fresh. If a round is racked in the slide twice, remove it and set aside. I keep a small plastic container on the safe for ammo pulled from the rotation to use at the next practice session.
Recoil springs typically should be replaced approximately every 2,500 rounds for 40 and 45, and 4-5,000 for 9mm depending on the pistol and load. Replace the springs according to manufacturer/armorer recommendations for defensive carry.
Range only guns can go much longer, this schedule is for a carry pistol. Make sure the spring weight matches the load. Change magazine springs once a year. Midway and Brownell’s have them for most common pistols. Keep several spare spring sets and also spare pins and other small parts. Keep a spare recoil spring in the range bag.
Have plenty of spare mags. Do not use carry mags for practice and do not use practice mags for carry. Practice should involve practicing reloads too. That means mags dropping in the dirt with sand and crud going inside and feedlips becoming bent and buggered up. Marking pens that use paint cost $5 or less at hardware or auto parts stores and are really handy to mark mags with unique numbers. Add a different color for the practice only mags. As soon as a mag starts causing malfunctions relegate it to practice only status. Mags need disassembly and cleaning too. Gunscrubber works well for metal mags to remove oil and grease. Test a small spot on plastic mags. If in doubt, use Dawn dish soap, wipe with a clean cloth and let air dry. Do not put lube inside of mags as it will attract grim.
As far as what to use to clean, there are endless debates, but there are a few things that are fact. Do not use graphite in any form. It absorbs water, gums up, and then hardens. WD-40 is similar, it will dry up and gum up with time or heat.
Hoppe’s benchrest solvent works well and will not damage the barrel if left to soak. For oil, Mobil 1 works well and a quart costs less than a tiny bottle of gun oil, some of which I suspect is Mobil 1. Same thing for grease, Lucas Red’n Tacky No. 2 is designed for high temps and high impact uses. It costs $5 for a huge tube at auto parts stores or Walmart and works well. The one gun specialty lube that I have found to really be worth the extra cost is Slide Glide from Brian Enos for use on 1911 and similar slides. Dave Berryhill near here in Austin had an even better grease recipe but took it with him when he passed. RIP.https://brianenos.com/pages/slide-glide
Here are a few helpful links for the most common carry guns.
Glock - excellent article https://www.eaglegunrangetx.com/maintaining-your-glock/
Glock Gen 4 spring exchange program - https://us.glock.com/customer-service/recoil-spring-exchange
Sig - http://sigforum.com/eve/forums/a/tpc/f/150601935/m/6801056451
1911 Maintenance - https://www.sightm1911.com/Care/
M&P how to change springs - http://www.frankproctorshooting.com/videos/mp-recoil-spring-replacement/
This turned out longer than intended, but hope that helps, and please go practice and carry.