Start with a forced-restart of your iPad - as this will often resolve an isolated problem:
- On an iPad with a Home button: Press and hold the top button and the Home button at the same time. When the Apple logo appears, release both buttons.
- On other iPad models: Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the top button. When the Apple logo appears, release the button.
Next, if no improvement is seen…:
If your iPad won't charge – Apple Support
Charge and monitor the iPad battery - Apple Support
It is possible that your battery may require replacement. Assuming that the iPad remains functional, you would be well advised to directly contact Apple Support - and request a remote battery test. The result of the test may better inform your next steps.
You will find the Contact Support link at top-right of this page. Alternatively, you can open a support case using the excellent Apple Support App. If not already installed on your iPad, the App can be downloaded from the App Store:
https://apps.apple.com/gb/app/apple-support/id1130498044
As a further alternative, you might visit the Genius Bar at your local Apple Store - where the technicians will be able to test and assess you iPad.