Need to make my program send random OTPs to my phone number

That function seems over complicated to me

How about

void updateOTP()
{
  for (int i = 0; i < sizeof(OTP) - 1; i++)
  {
    OTP[i] = random(48, 58);
  }
  OTP[4] = '\0';
}