my phone was lo battery when i fell asleep last night and when i woke up it was off i powered it on and it was at like 20 percent but shuts off right away and will not charge
It could be a faulty charger, USB lead, battery, phone USB port, or something further inside the phone. Assuming that battery failure is the most probable, see if you can try a good one in the phone without buying first, perhaps at a friendly repairer or phone shop.