Bluetooth not turning on in ESP32

Sorry my bad, actually In my code there is a if condition like this

If(isPairing()) {
   SerialBT.begin("xxxx");
   isPairing = false;
}

That's why it's only iterate one time in the loop and I tried by printing a text before and after begin then it's just printing text that written before the begin statement, and statement just after the begin not printing means loop stuck at the beign() part.