In cold weather, the battery works differently at a chemical level. The electrolyte inside a lithium-ion battery becomes thicker and transmits ions more slowly, so your phone simply can't deliver the current it needs. It's like trying to pour cold oil quickly - it moves slower. That's why your smartphone loses charge faster or even shuts down, even though the battery actually still has plenty of energy.
Good news: it's reversible. Once your phone warms up indoors, the battery will return to normal operation and show all the remaining charge. Does the battery get damaged from cold discharges? A single exposure to cold won't hurt it, but if you constantly keep the battery at below-zero temperatures while simultaneously draining it, then yes - that can speed up wear and reduce overall lifespan.
To avoid problems, just keep your phone in your pocket close to your body in winter if you plan to use it actively outside. And if the battery situation is really critical, keep your smartphone in an insulated case or bag. Don't panic if the charge drops from 100 to 20% in an hour or two in the cold - that's normal, and it'll bounce back once it warms up.