While unlocking the Bootloader, a must-doing task is to Enable Fastboot OEM Unlock, and USB debugging. OEM Unlock is needed to unlock the process and USB debugging helps to establish ADB connection successfully between the device and PC.
You will get the option to enable OEM Unlock in the Developer Options menu of the phone. But this Developer Options itself remains hidden, and you have to enable it first.
Open the Settings option in your device and head over About Phone and seven-time tap on Build Number.
Now, go back to Settings and then Advanced option. Go to System, and you should see the Developer Options here. You will find USB Debugging and OEM Unlocking. Toggle next to them to enable them.