GCP used to have a documentation that explained about using Google Compute instance as a custom NAT Device, it is now deprecated and deleted as per the documentation.
Bas