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:

Root: I used the Boot Image Patching Installation Method from here:

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