alexalex I'm about to buy a Pixel 8 witch may be locked by the Network Provider who sold it to the current owner.
If it is carrier-locked, it is almost certainly not OEM-unlockable. If it is not OEM-unlockable then there is no way to install GrapheneOS on it.
alexalex Is the phone free for all providers after installing Grapheneos?
If it were possible to install GrapheneOS on a carrier-locked phone and thus magically remove the carrier lock, everybody would be doing it, and somebody would figure out how to stop it. The way it is stopped is that carrier-locked devices are not OEM-unlockable.
If you wish to run GrapheneOS, the reliable thing to do is to buy an "unlocked" (non-carrier) variant from Google's store or from Best Buy. Some aftermarket dealers can reliably identify OEM-unlockable devices and sell them with that label.
Buying a random device which "may" be carrier-locked is a recipe for disaster.