user77594: const int buzzerPin = 7;
const int flamePin = 10;
int Flame = HIGH;
int redled = 8;
void setup() 
{
  pinMode(buzzerPin, OUTPUT);
  pinMode(redled, OUTPUT);

  pinMode(flamePin, INPUT);
  Serial.begin(12000);
}

void loop() 
{
  Flame = digitalRead(flamePin);
  if (Flame== HIGH)
  {
    digitalWrite(redled, HIGH);
  int i=0;
  do {
    digitalWrite(buzzerPin, HIGH);
    tone(buzzerPin,450);
    delay(200);
    noTone(buzzerPin);
    delay(200);
    
  }while (i<2);
  } 
  else
  {
    digitalWrite(buzzerPin, LOW);
    digitalWrite(redled, LOW);
  }
}


user31668: Here are the modifications I have done

I changed the Piezo Buzzer frequency to 3000 Hz
The green Button simulates the Flame signal
Change the RED LED from pin 8 to Pin 13 so that I don't have to use an external LED

Here is the simulation output

Observe the onboard LED going HIGH and the buzzer going off. You can find the project link here where you can test with different Piezo buzzer frequency.
Code
const int buzzerPin = 7;
const int flamePin = 10;
int Flame = HIGH;
int redled = 13;
void setup() 
{
  pinMode(buzzerPin, OUTPUT);
  pinMode(redled, OUTPUT);  

  pinMode(flamePin, INPUT);
  Serial.begin(12000);
}

void loop() 
{
  Flame = digitalRead(flamePin);
  if (Flame== HIGH)
  {
    digitalWrite(redled, HIGH);
  int i=0;
  do {
    digitalWrite(buzzerPin, HIGH);
    tone(buzzerPin,3000);
    delay(200);
    noTone(buzzerPin);
    delay(200);
    
  }while (i<2);
  } 
  else
  {
    digitalWrite(buzzerPin, LOW);
    digitalWrite(redled, LOW);
  }
}

Disclaimer: I am not the Wokwi creator but I support it since it is open source and free to use

77594: <pre><code>const int buzzerPin = 7;
const int flamePin = 10;
int Flame = HIGH;
int redled = 8;
void setup() 
{
  pinMode(buzzerPin, OUTPUT);
  pinMode(redled, OUTPUT);

  pinMode(flamePin, INPUT);
  Serial.begin(12000);
}

void loop() 
{
  Flame = digitalRead(flamePin);
  if (Flame== HIGH)
  {
    digitalWrite(redled, HIGH);
  int i=0;
  do {
    digitalWrite(buzzerPin, HIGH);
    tone(buzzerPin,450);
    delay(200);
    noTone(buzzerPin);
    delay(200);
    
  }while (i&lt;2);
  } 
  else
  {
    digitalWrite(buzzerPin, LOW);
    digitalWrite(redled, LOW);
  }
}
</code></pre>
 31668: <p><strong>Here are the modifications I have done</strong></p>
<ul>
<li>I changed the Piezo Buzzer frequency to 3000 Hz
The green Button simulates the Flame signal</li>
<li>Change the RED LED from pin 8 to Pin 13 so that I don't have to use an external LED</li>
</ul>
<p><strong>Here is the simulation output</strong></p>
<p><a href="https://i.stack.imgur.com/pTzPR.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pTzPR.gif" alt="enter image description here" /></a></p>
<p>Observe the onboard LED going HIGH and the buzzer going off. You can find the project link <a href="https://wokwi.com/arduino/projects/300993767428588045" rel="nofollow noreferrer"><strong>here</strong></a> where you can test with different Piezo buzzer frequency.</p>
<p><strong>Code</strong></p>
<pre><code>const int buzzerPin = 7;
const int flamePin = 10;
int Flame = HIGH;
int redled = 13;
void setup() 
{
  pinMode(buzzerPin, OUTPUT);
  pinMode(redled, OUTPUT);  

  pinMode(flamePin, INPUT);
  Serial.begin(12000);
}

void loop() 
{
  Flame = digitalRead(flamePin);
  if (Flame== HIGH)
  {
    digitalWrite(redled, HIGH);
  int i=0;
  do {
    digitalWrite(buzzerPin, HIGH);
    tone(buzzerPin,3000);
    delay(200);
    noTone(buzzerPin);
    delay(200);
    
  }while (i&lt;2);
  } 
  else
  {
    digitalWrite(buzzerPin, LOW);
    digitalWrite(redled, LOW);
  }
}
</code></pre>
<p><em>Disclaimer: I am not the Wokwi creator but I support it since it is open source and free to use</em></p>
