Chosen Solution
Every time I would take my galaxy S5 off the charger, the phone would cut off and die no matter if it is on 100%, 90%, 80% etc. Also, when I would run an application it would freeze and I’d have to repeatedly close the app and reopen before it runs smoothly.
The most probable cause would be a worn out battery. I had the same issue with my iPhone 6 and it was fixed by replacing the battery. This is normal and happens to all batteries as they age. I have provided links to the battery and replacement guides: Looks like you don’t even need tools for the repair. Battery: Galaxy S5 Battery Guide: Samsung Galaxy S5 Battery Replacement