Start here:
If your iPhone, iPad, or iPod touch won’t connect to a Wi-Fi network - Apple Support
…and here:
Recommended settings for Wi-Fi routers and access points - Apple Support
If your WiFi has been set-up according to Apple’s recommended settings, WiFi and Internet connection difficulties are usually an indication that your device does not have a routable IP Address - your IP Address usually being assigned by DHCP. When this occurs, your iPad may only have a self-assigned link-local IP address that begins 169.254.x.x.
If you continue to have difficulties, check to see if your iPad is using the new WiFi Private Address feature. This feature is intended to provide additional privacy and security when using “public” (untrusted) WiFi networks.
Settings > WiFi > [Your WiFi Network / SSID] - tap the “i” icon - Private Address
The Private Address feature is largely unnecessary for your home WiFi network; if enabled, Private Addressing can interfere with network connectivity. You may need to disable this feature - and can be enabled or disabled for each individual network.
Use private Wi-Fi addresses in iOS 14, iPadOS 14, and watchOS 7 - Apple Support