What is difference between NodeMCU and esp8266?
From https://forum.arduino.cc/index.php?topic=616324.0:


  NodeMcu is the name of the firmware originally for the ESP8266
  microcontroller, with support for the ESP32 microcontroller added more
  recently, that allows you to program these microcontrollers using the
  Lua programming language.
  
  NodeMCU firmware was developed so that AT commands can be replaced
  with Lua scripting making the life of developers easier. So it would
  be redundant to use AT commands again in NodeMCU.


And ESP8266 is one of the microcontrollers supported by the NodeMcu firmware.

From NodeMcu vs Esp32 vs esp8266


  In the early days of the hobbyist community's adoption of the ESP8266,
  ESP8266 development boards were marketed with the name NodeMcu and the
  term "NodeMcu" started to be associated more with the hardware than
  the firmware. It is common for people with no interest in the Lua
  programming language to buy "NodeMcu" boards and program them with the
  Arduino IDE, which erases the NodeMcu firmware from the board. To make
  things more confusing, multiple companies marketed boards with the
  name "NodeMcu", but with small hardware differences. Over time, the
  NodeMcu boards became less popular in the Arduino world because the
  similarly priced WeMos D1 Mini came out with the same functionality,
  but in a smaller form factor. Now, the "NodeMcu" name is being used to
  market ESP32 boards as well.