I recently got a Pixel 3a to replace my dying Honor 9, and here are the steps I used to unlock the bootloader and obtain root. Note – it was running Android 10.

Unlock Bootloader:
https://android.gadgethacks.com/how-to/unlock-bootloader-your-pixel-3a-0198625/

Root: I used the Boot Image Patching Installation Method from here:
https://forum.xda-developers.com/pixel-3a/how-to/how-to-root-pixel-3a-preferred-t3938783

When rooted be sure to turn off
Automatic System Updates under developer settings