...preferred way?
In my opinion this is the preferred way to get Android 12 and root:
- Flash the factory image with a modified flash-all.bat file.
* Change this line:
fastboot -w update image-bramble-sp1a.210812.015.zip
* To this:
fastboot --disable-verity --disable-verification -w update image-bramble-sp1a.210812.015.zip
Yes it is a PITA because it wipes your phone and you will spend some time setting it up again.
It is worth every minute. Why?
- You may have apps that are not compatible with Android 12 and sooner or later they will cause problems.
- You could brick your phone using other methods.
...temporary root?
Means root does not survive a reboot.
So make time to backup all the data you want to keep: pictures, documents, etc.
Then make time to install Android 12 the preferred way.
Also, read this
Guide. It list all the ways to upgrade to Android 12. Then decide how you want to upgrade.