Edit 1:
Regarding “Nothing is displayed in the serial monitor” [from code like if (Serial.available()) { Serial.write(Serial.read()); }]: I'm assuming that the sketch in use has a setup() routine containing a Serial.begin(somedatarate) statement, with the same data rate selected in the serial monitor as in the Serial.begin() statement. I'm also assuming the sketch has a loop() routine containing the if (Serial.available()) { Serial.write(Serial.read()); } code.
I'm also assuming the sketch was properly downloaded, and then the serial monitor was opened, using the USB-serial port the ESP8266 is attached to, and then you typed some text into the text entry box of the serial monitor and pressed or clicked Enter to send the text to the ESP8266, with a proper setting for the end-of-line character.
If all those assumptions are correct, but nothing shows up in reply to the text you send, then it seems likely some hardware or software issue is occurring. For example, when the Serial data structure is set up (when the sketch begins running) it might be selecting an incorrect Rx pin. Or something may be loading down the Rx pin. To find out if either of those is the case, use an oscilloscope (if you have one) to look at what's arriving at different ESP8266 pins when you send text from the serial monitor. If no scope, connect a 5K-10KΩ resistor to an LED and use that as a logic probe. One end of the resistor connects to a probe; the other end goes to the LED anode; and the LED cathode is grounded. Test if that's working by touching the probe to +3.3V. When the probe appears to be working ok, use it to check for brief flashes of data at different Rx pins on the ESP8266 when you send data from the serial monitor. If no data gets to the ESP8266, it can't echo it. (Note, I'm not sure how your NodeMCU ESP8266 handles serial-via-USB data; my notion that serial data should be visible on some Rx pin might be wrong.)
If it appears data is getting to some pin but isn't showing up as available, you might try opening software serial on that pin. Some examples appear in code in a serial monitor note at github.com/esp8266. I don't know enough about NodeMCU / ESP8266 to say what to do if probing and software serial don't help.