Sending lots of data using Serial

batata004:
Upload this to your arduino:

void setup() {

Serial.begin(115200);

while (true) {
       
        if (Serial.available()) {
   
        String resultado = "";
   
            while (Serial.available()) {
   
                delay(50);
                resultado += (char)Serial.read();
   
            }
           
            Serial.println(resultado);
           
    }
       
  }

}

void loop() {

}

From your title I thought you were trying to SEND data but that program is designed to RECEIVE data first. If you want to receive data reliably have a look at Serial Input Basics

If you don't receive the data reliably there is not much likelihood that you will be able to send it reliably.

OR
Why don't you test your program by sending data from an array in the program rather than trying to send back data that must first be received.

...R