I currently have a VM Instance (Linux Debian) within google cloud that has a functioning environment for my python project, and everything works when inputted: "python3 run.py" via SSH command line.
How can I automate the running of the instance > then the execution of that python file > then the stopping of the instance? I couldn't find very much when looking around
Look at the starting and stopping of an instance! https://cloud.google.com/compute/docs/instances/schedule-instance-start-stop
Clouds
If the task you are running can take a variable amount of time (and so it would be difficult to schedule it to turn off), you could start it on the schedule and then the script itself could initiate the shutdown by making a "gcloud" call directly from the VM itself once it has completed whatever processing it is carrying out.
One other thing to add, if the script takes less than 1 hour, you might want to keep an eye on Cloud Run Jobs, this is a new service in preview, but could be useful depending on what you are trying to do, see: https://cloud.google.com/run/docs/create-jobs