Make sure your cord is a data-enabled cord not just a charger cord.
Enable USB debugging in developer options. To enable developer options go to phone settings > About Phone > Build Number. Keep tapping on the build number until it says developer options enabled. Then go back to phone settings and it will show developer options.