Switching a relay on and off using "millis()" without interfering with the runtime of the other piece of code

Nope. When logging is enabled. Like this:

void useNewData()
{
  if (newData == true)
  {
    //Serial.print("This just in ... ");
    Serial.println(receivedChar);

    if (receivedChar.indexOf("2") > -1 || voltage > 2 )
    {
      creat_file();
      enableDataLogging = true;
      previousMillis = 0;    // <----------------
      alreadyRun = false;    // <----------------
      //Serial.println("Data logging enabled");
      //digitalWrite(LED_BUILTIN, HIGH);
    }
    if (receivedChar.indexOf("5") > -1)
    {
      enableDataLogging = false;
      //Serial.println("   Data logging disabled");
      //digitalWrite(LED_BUILTIN, LOW);

      if (file) file.close();
      //SysCall::halt();
    }
    newData = false;
  }
}//useNewData