@ronakswami you have not told us what you have checked. You need to start with your charger. Make sure that it is working properly. Next check your charging cable. Try a different one to make sure it is okay. After that you want to check the charging port. Make sure that it is clean, with no bend or corroded pins. You can clean it with a few drops of isopropyl alcohol and some canned air.
If all of that is okay, you need to consider changing the battery. Then re-evaluate. If it is still not charging, it could be the charging port that has failed or your phone is having issues with the charging circuitry. That will require some board level repair.
[guide|147166] and something like [https://www.youtube.com/watch?v=WyleZMjJqas|this video] for the charging port. The charging board, which includes the charging port, is available at many sites. Just do an online search for a vendor that meets your requirements.