[solved] Serial.readStringUntil does not work correctly in my code

Did you mean because of the Strings. The string and String are not interchangeable terms. It may seem pedantic, but the 2 are very different.