Great! I'd recommend installing GrapheneOS this way. Phone to phone install is very easy and reliable.
While the phone is flashing don't touch the device you a flashing to (the Pixel 6a). The Pixel 6a will restart multiple times during the flashing process. You will have to accept a prompt on the screen of the Pixel 7 after each restart.