The maximum output current from one GPIO pin of ESP8266 is 12mA. In the case of ESP32, it is 40mA. connecting a micro- sized motor to esp8266 is a bad idea. Use a motor driver IC.