[OnePlus 8 Pro Questions & Answers] Deleted member 9635294:
quote from this https://xdaforums.com/t/guide-unlocking-bootloader-rooting-from-start-to-finish-android-10.4151823/

Obtaining ADB access to your device using your computer

1. Connect your phone to your computer using the cable that you charge it with

2. Allow it to see the device, if it automatically installs the driver (which it should) then you're good to go, if not then install the driver you can obtain from the drive which will appear on screen within "This PC" (i won't detail this as it's pretty self explanatory)

3. On your phone Open settings and navigate to "About phone"

4. Click "Build number" several times (5) then enter your PIN, this will enable "Developer Options"

5. Back out, then click "System"

6. Scroll down to "Developer Options" and open it.

7. Scroll down to "USB Debugging" and turn it on (if at this point you are prompted with a dialogue box asking for authorization then please check the box and allow it, also turn on) also turn on "OEM Unlocking" in the same section and agree to any prompts.

8. On your computer Download this folder https://drive.google.com/drive/folders/1S-yNzdvOvdZzPuxhYuEuwnelzfdEd0K2?usp=sharing

This is adb and fastboot so you can talk to your phone via your PC.

9. Move it to the root of the C: drive, so it looks like this in the filepath

C:\Android

10. Navigate to the folder and perform the following:

i) Hold shift and right click an empty space within the folder

ii) Click "Open Powershell Window here" or "Open a Command prompt Windows here"

iii) A black or blue window will appear with some text

11. In the window type the following command

adb devices

press enter

If you are now prompted with an authorization dialogue on your phone, please check the box and allow it.

You should see a readout of a device followed by a code, you now have ADB access and can continue.

Unlocking the bootloader

NOTE* THIS WILL WIPE YOUR ENTIRE DEVICE, IT'S UP TO YOU IF YOU WANT TO BACK UP OR NOT. I WOULD RECOMMEND DOING SO

1. Connect your phone to your computer

2. On your computer Navigate to C:\Android

i) Hold shift and right click an empty space within the folder

ii) Click "Open Powershell Window here" or "Open a Command prompt Windows here"

iii) A black or blue window will appear with some text

3. Type the following command into the window

adb reboot bootloader

press enter

On your phone

i) Your phone will reboot and show you a screen with 3 language choices, Choose "English" then "Advanced" and finally "Reboot to fastboot" and "Reboot to fastboot"

ii) You'll see a screen appear on your phone with some text, at the top you'll see the word "START" in green, you're now in Fastboot

4. On your computer Type the following command into the window

fastboot oem unlock

press enter

NOTE* THIS IS THE PART THAT WIPES YOUR PHONE IF YOU WANT TO BACK OUT, NOW IS THE TIME TO DO SO, ONCE STARTED DO NOT DISCONNECT THE CABLE OR FORCE A SHUTDOWN FOR ANY REASON THIS COULD RESULT IN A BRICKED DEVICE

5. Your phone will warn you and go through a set of screens, please agree and move forward until the device reboots

You have just unlocked the bootloader to your phone

Once the device has booted, set it up again and then follow the steps to unlock "developer options" and "USB Debugging" once more.