Test anotner known good USB-C cable and other know good Apple power/charging adapter block.
The original Apple 18 or 20W, that came in the box, with that iPad, could, also, be faulty.
Apple's power/charging accessories go bad/faulty, somewhat often. Especially the power/charging adapter blocks.
If one or both of these is faulty, you would to search online for your nearest, “local” Apple store location and call contact phone numbers and call to make an appointment to get either or both of these power/charging accessories replaced for free. and/or purchased extra, new power/charging accessorries for this iPad
OR
You can just purchase these here.
Tap the online Apple Store links below.
https://www.apple.com/shop/product/MHJA3AM/A/20w-usb-c-power-adapter
https://www.apple.com/shop/product/MLL82AM/A/usb-c-charge-cable-2-m
Best of Luck to You!