If you have rooted the Google Pixel 3 smartphone and wish to maintain root access after upgrading to Android 12, you need to use the Pixel Flasher.

The Pixel Flasher is a flashing tool for managing Google Pixel smartphones. With it you can update and root Pixel devices. There is a detailed guide on XDA Developers on how to use it. The key to getting root access with Pixel Flasher is outlined in the description here:

Boot.img management UI, select the boot.img file to patch and click the patch button. Fully Automated patching with Magisk (without manual steps) and performing upgrades without losing root.

It comes with boot image management, which allows you to upgrade the firmware without losing root access. Quite a handy tool!

Magisk is the tool that requires you to use a patched boot image to get root access. We have written extensively on Magisk. If you already know how to install Magisk, you may still be interested in how to get the boot image for Magisk. And here are the rest of our Magisk articles.