There are many ways to transfer files to GCP vm instances, the one that I like is using native function to upload files, to use it, in your GCP console go to your instance, click SSH button and in the top right corner of the SSH window you will see a gear, click it and there is an option called “upload file,” that will open a menu where you can browse your local drive(s) and choose the file which you want to upload, click upload button and that’s it. Here you can consult Google documentation about this process.
However if you’re interested in transfer files using gcloud commands from your workstation, it is necessary to install Cloud SDK and configure it to interact with your project and instances, in order to perform that task you can visit this page which contains all the information that you need to start, in this menu you can find the official GCP software for your OS and a full starter guide.
Finally, the command that you’re running must be execute from your local machine using SDK tools, or in cloud shell, to open cloud shell, look in the top right corner of your GCP console the icon with this symbols “>_” click it, and you will see the cloud shell, nevertheless before transfer any file to your instance using cloud shell it is necessary to upload the file to your project, this process is similar to the first that I described, this document can help to clarify the process.
Hope this information will be useful for you.