SMS Alarm - GSM SM100B-d

char incoming_char=0;

int A = 0 ;
#include <SoftwareSerial.h>
void setup()
{
  
  Serial.begin(9600);
  
  Serial.println("Starting SM5100B Communication...");
  Serial.println("Moisture Sensor Value...");
}

void loop()
{
  if(Serial.available() >0)
  {
    incoming_char=Serial.read();  // Get the character coming from the terminal
    Serial.print(incoming_char);   
  }
  
  Serial.print("Moisture Sensor Value:");
  Serial.println(analogRead(0));  
  delay(3000);
  
  if ( analogRead(0) > 400 ) 
  {
 
  Serial.write("AT+CMGF=1");
  Serial.read();
  
  delay (2000);
  Serial.write("AT+CMGS=\"");
  Serial.read();
  delay(2000);
  Serial.write("+96170092522");
  Serial.write("\"");
  Serial.read();
  delay(2000);
  Serial.write("I need Water");
  Serial.read();
  Serial.write(".\0x1A");
  Serial.write(char(26));
  Serial.write(0x0A);
}
}

Can i please what is wrong with my code ?

  Serial.write("AT+CMGF=1");
  Serial.read();

Why are you reading from the serial port, without checking that there is anything to read? Why are you discarding what you are reading?

Can i please what is wrong with my code ?

You need to tell us. The code does something. We are not going to guess what it does.

You want the code to do something. We are not going to guess what you want.

Why do you include SoftwareSerial.h, when you don't use SoftwareSerial?