It's a bug on the Uno as well, it's just that the Arduino developers decided to suppress some errors for the AVR boards. (This was a mistake of course, you want the compiler to notify you of possible errors, but it was impossible to revert without breaking a lot of code.)
Well one way to get better at coding is by having more experienced programmers review your work.
Strings dynamically allocate memory to store the array of characters. Usually, resizing or assigning a String eventually results in a call to the C library function malloc which allocates memory on the “heap”.
AFAIK, most implementations of malloc are non-reentrant, as malloc keeps a global list of free blocks of memory. If your main program calls malloc, and then an interrupt fires when you are right in the middle of it, you cannot call malloc again because the previous call (in the main program) has not finished yet. If you do call malloc from the interrupt handler, it will most likely corrupt the global state. On platforms with a thread-safe malloc implementation, it'll most likely just deadlock because there's no way to make any progress while your interrupt handler is waiting for the main code to finish, and the main code is waiting for the interrupt handler to finish.
Even if you have a reentrant implementation, malloc can be nondeterministic (you don't know how long it will take), which is not something you want in an interrupt handler in a real-time system, interrupt handlers should be kept as short as possible.
On the ESP32, which is a multicore microcontroller, they have this to say about it:
Heap functions are thread safe, meaning they can be called from different tasks simultaneously without any limitations.
It is technically possible to call malloc, free, and related functions from interrupt handler (ISR) context. However this is not recommended, as heap function calls may delay other interrupts. It is strongly recommended to refactor applications so that any buffers used by an ISR are pre-allocated outside of the ISR. Support for calling heap functions from ISRs may be removed in a future update.
The avr-libc malloc documentation doesn't mention reentrancy, but looking at the source code, it doesn't do anything to make reentrant calls possible.