If your PS4 controller won't charge, you can try swapping out the charging cable or checking the charging port. You can also try resetting and re-pairing your controller, or performing a power cycling ...
Make sure the battery works, check the connection, and disconnect it from other devices If you find that your PS4 controller won't connect to your PS4, then you may be dealing with a firmware problem, ...