You can use a cable to directly connect your iPad to a Mac with OS X 10.9 or later, or to a Windows device with Windows 7 or later.
Using the charging cable for your iPad, connect iPad to the USB port on your computer. If the cable isn’t compatible with the port on your computer, you’ll need to use an adapter (sold separately).
Note: If an alert appears on your iPad asking whether to trust this computer, select Trust. (See the Apple Support article Use your computer to erase all content and settings from iPad.
Apple Support article: About the Apple USB-C to USB AdapterApple Support article: About the Apple USB-C to Lightning Cable