If your phone suddenly switches off while using and then shows 0% battery when you turn it back on, immediately switching off again, the most likely culprit is a faulty or worn-out battery, which is no longer able to hold a charge properly and is likely nearing the end of its lifespan.
A few reasons why this might be happening:
* Degraded Battery
* Battery Damage
* Loose Connections