relay buzzing noise

Hello Everyone! My code is working the way I intend except the relays are making a buzzing noise. (They are the common Kuman 4 channel 5V relays blocks for Arduino) Is this what is called debounce? Or is there some other issue? Thank you for your patients for a total noobie.

// open an closes a door with a linear actuator controlled by two relays. The position
//of the door is monitored by a tilt sensor.

const byte RELAY3=4;
const byte RELAY4=5;
const int ypin = A3;                  // y-axis of tilt sensor

int potValue= 0;
int diff = 0;
int yValue = 0;

void setup()
{    
  Serial.begin(9600);
  // Initialise the Arduino data pins for OUTPUT
  pinMode(RELAY3, OUTPUT);
  pinMode(RELAY4, OUTPUT);
  //turn them all off
  digitalWrite(RELAY3,HIGH);
  digitalWrite(RELAY4,HIGH);
} 
 void loop(){
      potValue=345; //desired door position
      yValue=analogRead(ypin);//value of tilt sensor 309 to 355 (+20 to -20 degrees)
      delay(10);
      diff=int(yValue-potValue);        
      if (diff <= 5 && diff >= -5) {
      digitalWrite(RELAY3, HIGH);
      digitalWrite(RELAY4, HIGH);
      }
      if (diff >5 ) {
      digitalWrite(RELAY3, LOW);
      digitalWrite(RELAY4, HIGH);
      }
      if (diff <-5){
      digitalWrite(RELAY3, HIGH);
      digitalWrite(RELAY4, LOW);
      }
      Serial.println(yValue);
 }

If you are powering the relay coils from the 5V pin, that will cause problems because switching a coil on will cause a slight drop in voltage that could affect your analog reading, also, there is no dead band (hysteresis) in your comparisons that switch the relays. For instance, on one scan through loop() diff = 5, relays pulls in, on next scan diff = 6, relay drops out, that's probably the buzzing you hear.

Try this (untested).
Leo…

// open an closes a door with a linear actuator controlled by two relays. The position
//of the door is monitored by a tilt sensor.

const byte RELAY3 = 4;
const byte RELAY4 = 5;
const byte ypin = A3; // y-axis of tilt sensor

int potValue = 0;
int diff = 0;
int yValue = 0;

void setup() {
  Serial.begin(9600);
  // first turn them all off
  digitalWrite(RELAY3, HIGH);
  digitalWrite(RELAY4, HIGH);
  // then initialise the Arduino data pins for OUTPUT
  pinMode(RELAY3, OUTPUT);
  pinMode(RELAY4, OUTPUT);
}

void loop() {
  potValue = 345; //desired door position
  yValue = analogRead(ypin); //value of tilt sensor 309 to 355 (+20 to -20 degrees)
  diff = (yValue - potValue);
  
  if (diff < 5 || diff < -5) // if + 5 or - 5
  {
    if (diff > 5 )
    {
      digitalWrite(RELAY3, LOW);
      digitalWrite(RELAY4, HIGH);
    }
    if (diff < -5)
    {
      digitalWrite(RELAY3, HIGH);
      digitalWrite(RELAY4, LOW);
    }
  }
  else
  {
    digitalWrite(RELAY3, HIGH);
    digitalWrite(RELAY4, HIGH);
    Serial.println(yValue);
    delay(1000);
  }
}