WiFi button doesn't allow to turn on WiFi
In Control Center?
If so:

Because you tapped the Wi-Fi icon in Control Center, the Wi-Fi icon turn to 'white' , that means Wi-Fi Is deactivated.
Tap on it, to activate the Wi-Fi again, it will be turn on to 'blue' again.

And you will have Wi-Fi connection again.
To turn Wi-Fi Off or On, go to -> Settings -> Wi-Fi.
-----
See the following Apple articles:
Connect to Wi-Fi on your iPhone, iPad, or iPod touch
Connect to Wi-Fi on your iPhone, iPad, or iPod touch - Apple Support
If your iPhone, iPad, or iPod touch won’t connect to a Wi-Fi network
If your iPhone or iPad won't connect to a Wi-Fi network - Apple Support
Check the route settings -> Recommended settings for Wi-Fi routers and access points
Recommended settings for Wi-Fi routers and access points - Apple Support
If you need help with your Wi‑Fi password
If you need help with your Wi‑Fi password – Apple Support (UK)
- You need to sign in to your router.
- The Wi-Fi network name, or SSID (service set identifier), is the name your network that has a password.
or If you have iOS 16 / iPadOS 16:
Go to -> Settings -> tap Wi-Fi -> tap on the hideen Password -> enter Passcode -> you will then see the Wi-Fi Password.
If they are On, turn Off Hotspot & VPN.