Connecting Arduino Uno WiFi Developer Edition to the Internet
Do you have access to the Webgui?

with the Webgui you can configure the wifi settings.
you do not need to upload sketches for this.
It is a good test if there is no defect.

Connect your PC Wi-Fi or with your smartphone directly to the Aduino uno wifi.
Start your browser and type in the following IP: 192.168.240.1
and now you should see the WebGUI.