Connect to SSID failed with MKR WiFi 1010

I bought a brand new Arduino MKR WiFi 1010, connected it to my PC with USB cable, used the Arduino IDE to select the MKR WiFi 1010 and run the blink program successfully.

Then I moved onto the Arduino IoT Cloud. I created an Arduino account, loaded the Create Agent and the setup the Web Editor and started to create a Thing. I selected the MKR WiFi 1010 the device and IoT cloud found the MKR WiFi 1010. I configured the device and assigned a name to the device and the device was configured successfully and was IoT ready. Next I added a variable,"bLED" of boolean type, to be used in a sketch and Dashboard. I added my network SSID and Password to connect the MKR WiFi 1010. I open the sketch prefabricated by IoT Cloud from the Web Edit. The sketch is a very simple as shown below:

#include "thingProperties.h"
int myLED = 8;
void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is 
  delay(1500); 
  pinMode(myLED, OUTPUT);
  
  // Defined in thingProperties.h
  initProperties();
 
  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  setDebugMessageLevel(4);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here 
}

void onBLEDChange()  {
  // Add your code here to act upon BLED change
  if (bLED)
  {
    digitalWrite(myLED, HIGH);
  }else
  {
    digitalWrite(myLED, LOW);
  }
}

I compiled and loaded the sketch to the MKR WiFi 1010 successfully. However I got the following message from the serial monitor when the sketch was running:

***** Arduino IoT Cloud - configuration info *****
Device ID: f874bed2-84f1-4ed6-9e89-082f7b9004ff
Thing ID: 40860874-184a-49a6-bd2a-c8f938c4f8c7
MQTT Broker: mqtts-sa.iot.arduino.cc:8883
WiFi.status(): 0
Current WiFi Firmware: 1.4.8
Connection to "DLink" failed
Retrying in "500" milliseconds
Connection to "DLink" failed

I have checked my SSID and password and made sure they were correct.

When setting up the WebEditor no library was asked to load. I suppose the WebEditor already has all the preferred libraries already loaded.

You help/advice/guidance is very appreciated.