ADB is not detecting the device
Did you enable the developer options again after doing a factory reset?If not follow the below steps to enable it.

Go to Settings, About phone and tap on build number 7 times to unlock/enable Developer options again (factory reset would've put it back to the default of locked/disabled).

Enable USB debugging from the developer options after the above step for adb/fastboot to work.