In some cases the Raspberry fails to connect to the Wi-Fi even if all he details are correct, usually this happens because the router can not assign the IP to the Magic Sorter. The fastest and quickest solution is to reboot your router, so it will refresh the pool of available IP addresses.
If that doesn't work, please double check the type of security for your WiFi network. The Raspberry Pi (which powers the whole system) supports only WPA2, WPA3 is not supported.