what happening with Servo Motor code

hi. I want to servo motor turn 90 and back 0 when TCS 3200 scan red but my servo doesn’t working with my code what heppenning help me please.
this is my last code

 int s0=3,s1=4,s2=5,s3=6;
int out=2;
int flag=0;
byte counter=0;
byte countR=0,countG=0,countB=0;
#include <Servo.h> 
Servo myservo;   
void setup()
 {
 Serial.begin(115200);
 pinMode(s0,OUTPUT);
 pinMode(s1,OUTPUT); 
 pinMode(s2,OUTPUT);
 pinMode(s3,OUTPUT);
  myservo.attach(8); 

 }
void TCS()
 {
 flag=0;  
 digitalWrite(s1,HIGH);
 digitalWrite(s0,HIGH);
 digitalWrite(s2,LOW);
 digitalWrite(s3,LOW);
 attachInterrupt(0, ISR_INTO, CHANGE);
 timer0_init();

 }
void ISR_INTO()
 {
 counter++;
 }
 void timer0_init(void)
 {
  TCCR2A=0x00;
  TCCR2B=0x07;   //the clock frequency source 1024 points
  TCNT2= 100;    //10 ms overflow again
  TIMSK2 = 0x01; //allow interrupt
 }
 int i=0;
 ISR(TIMER2_OVF_vect)//the timer 2, 10ms interrupt overflow again. Internal overflow interrupt executive function
{
    TCNT2=100;
    flag++;
 if(flag==1)
  {   
    countR=counter;
    Serial.print("red=");
    Serial.println(countR,DEC);
    digitalWrite(s2,HIGH);
    digitalWrite(s3,HIGH);      
  

    
  }
  else if(flag==2)
   {
    countG=counter;
    Serial.print("green=");
    Serial.println(countG,DEC);
    digitalWrite(s2,LOW);
    digitalWrite(s3,HIGH);
   }
   else if(flag==3)
    {
    countB=counter;
    Serial.print("blue=");
    Serial.println(countB,DEC);
    Serial.println("\n"); 
    digitalWrite(s2,LOW);
    digitalWrite(s3,LOW);
   
    }
    else if(flag==4)
     {
     flag=0;
     }
       counter=0;
}
void loop()
 {  int x = "flag==1";
    int y =  "flag==2";
    int z =  "flag=3";
    if (x>=y || x>=z){
       myservo.write(0); 
        delay(1000);      
        myservo.write(90); 
        delay(1000);      
     
      
      }
  
 
  TCS();
while(1);
 
 }

Thank you

Why do you write while(1);?

Don't do Serial stuff in your ISR. Serial relies on interrupts that are turned off during your ISR.

void ISR_INTO()
 {
 counter++;
 }

counter should be declared volatile, I think.

it error compiling.

I am reffering to this page.

It error compiling? That's too bad. Since you're the only one who knows what the error message was I guess you're going to work on it by yourself now right?