You can use any stuff that was designed for use on guns. Whatever your choice will work just fine. Follow the manufactures instructions.
G-23 is correct but, I would suggest keeping aerosol cleaners such as "Gun Scrubber" away from any and all non-metal parts. Many years ago, I accidently discovered that it will fuse plastic parts to each other.
CLP and nothing else, imo. For the external stuff i like to strip the slide and reciever once or twice a year (thats all i clean mine) and wash them with soap and warm water really well. Then soak and clean all internals with clp. Then reassemble with some very livht clp on moving parts. The slide gets a VERY light wipe down with clp on a rag, reciever gets nothing.
-Hoppe's #9 bore solvent for bore cleaning. -Hoppe's Elite Gun Cleaner for cleaning everything else, including plastic. Any metal parts I clean with this, I then wipe down with Ballistol and wipe dry for corrosion protection. -Ballistol for lubrication and corrosion protection.
For a long time, I would use Hoppe's #9 (and scrub and scrub and scrub) then flush it out with Rusty Duck (can't find it anymore, now use Winchester Break Free Powder Blast aerosol), let it air-dry, then lube and reassemble. Nowadays I use a different cleaning method that avoids all the scrubbing, but costs money to set up (ultrasonics).
I used to use moonshine for cleaning and bear grease for lubrication. I kept both in Mason jars on my workbench. Sometimes, I'd take a sip of the 'shine... or two... or 3. Since I had the lid off. After a few sips one night I got the jars mixed up. It didn't hurt my Glock my I had to lick the dog's butt to get the taste out of my mouth.
I've been using Hoppe's #9 for 3 years on my Glocks and I've never had a problem. I only use it on the bore of the barrel, and very rarely on the breech face and other parts of the slide. After using it, I wipe the piece that I cleaned dry, soak the piece in Ballistol oil, then wipe dry again. I know you're not supposed to use it on nickel plated pieces because Hoppe's #9 contains ammonia which will eat away at the copper undercoat and undermine the nickel plating. Glocks have several nickel plated components: the frame rails of the newest Glocks, the locking blocks, trigger bars, connectors, ejectors, firing pins, firing pin safeties, and extractor depressor plungers. All of which have a copper undercoat.