I need help with Lora

Greetings.
I made a communication using 2 arduino mega and 2 lora. Thanks to the rtc module, I send the time information to the other arduino mega with lora. I also write the time information to the sd card thanks to the sd-cart module.
When the data coming out of the transmitting lora cannot go to the receiving lora, it should give a warning to the screen, and when the data reaches the receiver again, it should rewrite the data packet that cannot be sent from the time of the interruption to this time to the sd cart module. How can I do this writing process. I have Lora e22 version.

You need to say exactly which one you have, there are quite a few and with different interface types.

And of course you need to post the code you are using, see here for details on how to;

You need a FIFO buffer.

When you try to transmit new data, you add it to the buffer and then try to send all the information stored in the FIFO buffer. if it works out you clear the buffer. If it does not you keep the buffer and hope for better luck next time.

At some point you won't have enough memory for the buffer though so you'll start loosing data / find a way to take that into account.