Serial was not declared in this scope! please help

hi! I was going to upload the following program to attiny85 through arduino R3, but it says , ’ “Serial” was not declared in this scope’
Can anyone please help me?
this is the code:

int trigPin = 3;
int echoPin = 2;
int buzzerPin = 4;
void setup() {
  Serial.begin (9600);
  pinMode(trigPin, OUTPUT);
  pinMode (echoPin, INPUT);
}
void loop() {
  int duration, distance;
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(20);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = (duration/2) /29.1;
  Serial.print(distance);
  Serial.print("cm");
  distance = map(distance, 0, 120, 1000, 3000);
  
    if (distance <= 5) {
    tone(buzzerPin, 1000);

  }
  else if (distance > 121) {
    noTone(buzzerPin);
  }
  
  else if (distance <= 25) {
    tone(buzzerPin, 1250);
  }
    else if (distance <= 50) {
    tone(buzzerPin, 1750);
    }
      else if (distance <= 75) {
    tone(buzzerPin, 2000);
      }
     else if (distance <= 90) {
    tone(buzzerPin, 2500);
     }  
       else if (distance <= 120) {
    tone(buzzerPin, 2750);
       }
  tone(4, distance);
  delay(200);
  noTone(4);
}

Pick your poison... 1. Remove the references to Serial. 2. Comment-out the references to Serial. 3. Use a core that supports Serial.

Sorry, i am totally confused, what do those things do?

They don't "do" anything. They are things you do. You pick the one that is most appropriate to your situation, do it, and then the code will compile.

so should I remove all serials?

That would be option #1 and it is certainly a reasonable choice.

if I take that off, will it change my program and it's function?

Your program will no longer print the measured distance. Nothing else will be affected.

Oh Ok and it worked! Thank you so much .Just uploaded it. :) :) :) :) :)

Glad to be of assistance.