MKR NB 1500 unable to connect to webserver

But you are attached to the gprs data network? (I mean not the mobile network)
I mean

if ((nbAccess.begin(PINNUMBER) == NB_READY) &&
        (gprs.attachGPRS() == GPRS_READY)) {
      connected = true;
 Serial.println("Connected!");
    } else {
      Serial.println("Not connected");
      delay(1000);
    }