All reachable batteries have a finite life. The battery in your iPad6 is very likely approaching the end of its usable lifespan.
As the iPad is still functional, you might consider making direct contact with Apple Support - and request a remote battery diagnostic test. You’ll find the Contact Support link at top-right of this page. You can also initiate a support case using the excellent Apple Support App. If not already installed on your iPad, it can be obtained from the App Store:
https://apps.apple.com/gb/app/apple-support/id1130498044
Alternatively, the technicians at the Genius Bar of your local Apple Store will be able run full diagnostics - and provide appropriate advice and options on the basis of test results.
Genius Bar Reservation and Apple Support Options - Apple
Alternatively, you might consider using Apple's mail-in service. You can verify eligibility and cost for your country/region here:
iPad Repair & Service - Apple Support
For practical purposes, in lieu of repairing or replacing a defective battery and returning your own iPad, Apple usually exchange the iPad for a renewed/refurbished iPad of the same model and specification. The cost of the exchange is the same as would otherwise be charged for repair/battery-replacement.