It is likely that your iPhone is not charging because its battery has worn out and does not have the capacity to charge anymore. This can happen when you have been using your phone and battery for a very long time. In this case, it is recommended that you change your iPhone battery as soon as possible.