DeepSleepMode

int countDown = 120;  // Countind down 2 minutes
unsigned long lastTick;
#define uS_TO_S_FACTOR 1000000  /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP  60        /* Time ESP32 will go to sleep (in seconds) */
RTC_DATA_ATTR int bootCount = 0;
void setup(){
  Serial.begin(9600);
}

void loop(){
  
  unsigned long currentMillis = millis();
  
  if(currentMillis - lastTick >= 1000){
    countDown--;
    displayCountdownToSerial(); 
    lastTick += 1000;   
  }  
}

void displayCountdownToSerial(){
  
  int mins = countDown / 60;
  int secs = countDown % 60;
  
  Serial.print(" Time Remain To Sleep = ");
  Serial.print(mins);
  Serial.print(" : ");
  Serial.println(secs);

  if(countDown == 0){
      esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
      delay(1000);
      Serial.println("Sleep now Start");
      esp_deep_sleep_start();
      Serial.println("This will never be printed");  
    
  }
}

Above was my coding for deep sleep mode for arduino . It will sleep every 2 min by countDown timing. It that possible during the sleep mode ,Example i'm using a ultrasonic sensor during the sleep mode function when it detected some distance arduino will wake up and does something?

Above was my coding for deep sleep mode for arduino .

but

esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);

An ESP is not an Arduino even if it can be programmed by the Arduino IDE.

t that possible during the sleep mode ,Example i'm using a ultrasonic sensor during the sleep mode function when it detected some distance arduino will wake up and does something?

I answer that question for an Arduino although it's probably a similar answer for the ESP.
If you sensor is able to send an interrupt signal to the Arduino and the Arduino is programmed to react on this signal, you can wake up in the event of distance change. As you didn't follow the sticky post at the top of the topic and forget to post links to the used hardware, we cannot help you any further.