If you want to flash a custom ROM onto your OnePlus 12R android phone, you will have to download and install TWRP onto your phone.
To install, you will need ODIN and a windows computer as it is only available for windows operating system. In the ODIN, download the TWRP file onto your computer, and click on flash both slots.
If you get stuck in fastboot, do this -> fastboot, reboot, and then fastboot again. In case, you have magisk, you can flash using this installer.
And that is it – you have successfully installed TWRP onto your OnePlus 12R. You will now be able to install custom ROMs / firmwares onto your android phone.
Keep in mind, you will lose all warranty coverage after this sort of modification. But, on the flip side, you would be able to root, install custom firmwares and so on. You will also be able to underclock / overclock OnePlus 12R on the go, to get more battery life or improved performance.