I am using a motorola g 5. When running adb devices on the terminal, nothing would show up. Here is what fixed it for me:
on Phone > Settings > Developer Options > Enabled USB Debugging
After that, I could see my phone in the terminal.