Folks, I am new to Arduino. Need help to automate water tank (water quantity)

Hello

Based on the below code how to connect the sensor to microprocessor

</>

-----( Setup function )-----/
void setup() {
Serial.begin(9600);
pinMode(8, INPUT_PULLUP);
}

/-----( Loop function )-----/
void loop() {
boolean run_cycle = true;
const int lowerSersor = digitalRead(8); // lower float sensor on digital pin 8

if (lowerSersor == LOW) { // float sensor has dropped down - tank empty
// Toggle on
if (run_cycle) {
sendSMS();
run_cycle = false;
}
}
if (lowerSensor == HIGH) { // tank now full
// Toggle off
if (run_cycle == false) {
run_cycle = true;
}
}
}

void sendSMS() {
// Some code here to send a sms
Serial.println("AT");
delay(1000);
Serial.println("AT+CMGF=1"); // send SMS in text mode
delay(1000);
Serial.println("AT+CMGS="+01XXXX""); //CHANGE TO Number , you'd like to receive message
delay(1000);
Serial.print("Water level is low in underground tank (attention required)"); // content of the message
Serial.write(26); // ctrl+z ASCII code
}