Grapheneos has a wonderful how to install procedure. I did it with a Linux Debian machine. It took several tries to get the bootloader right, part of that was I didn’t know what I was looking for. Once your phone has the red triangle in the bootloader of the phone, the installer should recognize it, and the installer was awesome from there.