Have you checked Settings/Screen Time for any restrictions?
Do you have access to another WiFi network where you can try? That has worked for several people.
Try a restart.
Restart your iPhone, iPad, or iPod touch https://support.apple.com/en-us/HT201559
Try a forced restart.
Reset Device. https://support.apple.com/en-us/HT201412
If necessary
Hard reset. https://www.wikihow.com/Hard-Reset-an-iPhone
If there are restrictions in Screen Time that are preventing access, you will need to restore the device to factory settings. Do not restore from a backup made when the Screen Time code was active.
If there aren't any Screen Time restrictions, do a backup and try a factory reset. Then restore from your backup.
Restore to Factory setting. https://support.apple.com/en-us/HT201252
Backup - Restore your device from an iCloud or iTunes backup. https://support.apple.com/en-us/HT204184