Find Port on MAC
ls /dev/tty.*
Install Firmware
The first thing to do is download the most recent MicroPython firmware .bin file to load onto your ESP8266 device. You can download it from the MicroPython downloads page.
Erase Flash
esptool.py --port /dev/tty.usbserial-14220 erase_flash
Flash Firmware
esptool.py --port /dev/tty.usbserial-14220 --baud 460800 write_flash --flash_size=detect -fm dout 0 esp8266-20220618-v1.19.1.bin