1. Most use a small lithium pack
A cordless glue gun uses a small lithium-ion pack, often a single 18650 cell or a flat pack of two or three, and it charges over USB or from a small adaptor. The barrel draws a lot of current while it is heating.
2. The heat is what wears it out
The heating element is the hard part of the job. A gun that heats slowly, or that never reaches working temperature, is usually a pack that cannot deliver the current, and that is often a cell that has aged.
3. Let it cool before it charges
A glue gun left on its stand stays warm, and a warm pack will not charge properly or will trip its safety cut-out. Give it a few minutes to cool down before you put it on the charger.
4. A thin nozzle saves the battery
A thick nozzle takes longer to heat and pulls more power for the same job. A fresh stick of glue and a clean nozzle means less time on the trigger, and less time on the trigger is what the pack feels.
5. Keep a spare pack charged
A second pack is small and cheap, and it turns a dead gun from a wasted afternoon into a two-minute change. Store it at about half charge, and give it a top-up every couple of months.