My phone only works when charging
I have dropped my phone a few times and the screen cracked a little. The thing is that about a week ago i was using my phone and it suddenly started lagging and being really slow, but when i plugged it in it worked perfectly. It still works when not plugged but it lags and slows down a lot. Also some times it turns on and off suddenly. I have had my phone for about 6 months and i really don’t know what’s going on. I have tried from just turning my phone off to reseting the whole thing as it was brand new. I honestly don’t know what else to do. Please Help!!! Also to clarify, the battery is working fine when not plugged in.