Microcontrollers have little RAM.
You will do better using C char-array zero-terminated strings than C++ String objects.
Avoid dynamic allocation like the plague.
Use Serial to communicate with Serial Monitor.
Arduino Foundations -- one page of docs on the Main Arduino site.