I created this GitHub Gist to show how to install Cuda on a newly-created VM instance on GCP. If you don't know which GPU model you should use, check out this stackoverflow question.
Simply put, Cuda is just an API for software to use GPU. So, before you install Cuda you have to make sure that it's compitable with your GPU model. In this link, you can find the following table which summarizes the minimum Cuda for each machine:
GPU type