After Upload "Board at COM5 is not available"

Trying to turn the onboard LED on my Nano 33 IoT on and off with Blynk just as a starting point since I’m clueless. I upload this code and the board loses connection.

 *************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include <SPI.h>
#include <WiFiNINA.h>
#include <BlynkSimpleWiFiNINA.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "qRtWUKwQL5zIiiyIzLCGP2O0syyBvOap";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Dont Blink 182";
char pass[] = "Starkey1";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
}

What is it that you are doing to trigger this message?

Pete.

I figured it out. It was happening when I would upload the code. It would restart the board after the upload but not reconnect. I had the wrong board set in the Arduino IDE