Help with Serial strings

The price of using the advantage of beeing small (= using a cheap microcontroller) is a bit more complex coding compared to a windows PC or a RaspBerry Pi

using String on a microcontroller is a bad idea as String eats up al memory over time making your controller crash.

If you really want to have something similar to standard String use SafeString
almost the same comfort without the danger of program crashes

SafeString even has non-blocking receiving of strings over the serial interface.

You can install the SafeString-library with the library-manager
documentation is here
https://www.forward.com.au/pfod/ArduinoProgramming/SafeString/index.html

best regards Stefan