Read the first and second posts. You can also see it in the end of the name of the .zip you're downloading. If it says "fastboot", you do it with fastboot. If it doesn't say "fastboot", you do it with TWRP which currently doesn't work with Android 12 as far as I am aware