How to have no delay in program.

Here is what I have come up with, its not working well.

What I am trying to do is when the sound sensor goes over the threshold it will will make
the led stay on, when the threshold is less then the led will go off.

const int ledPin = 3;
int sound = A0;
int threshold = 400;
int sensorValue = 0; 

int ledState = LOW;          
long previousMillis = 0;  
long interval = 1000;

void setup() 
{
    Serial.begin(9600);
    pinMode(ledPin, OUTPUT);
}
 
void loop() 
{
        int sensorValue = analogRead(sound);
	Serial.print("sensorValue ");
        Serial.println(sensorValue);
        unsigned long currentMillis = millis();
        
    if(currentMillis - previousMillis > interval) 
   {
    previousMillis = currentMillis;      
   }
     if(sensorValue > threshold)
   {
     ledState = HIGH;
   }
    else
      ledState = LOW;

   digitalWrite(ledPin, ledState);
  }