Who told you to do this? It will block your code until something enters into the serial buffer.
- Ditch Strings and start using C-strings.
- Have a read of Serial Input Basics
- Use the strcmp function to compare 2 strings in an if statement
- here is a partial simulation for your example: serial input question - Wokwi ESP32, STM32, Arduino Simulator. type any of your 3 words in the serial monitor (enclosed in start "<" and end markers ">" ) and the word will get outputted to the serial monitor.
for example: type in <verde>
and it will output This just in ... verde
. Typing in anything that isn't one of the 3 words will output nothing.