I created a VM instance in Googl Compute Engine and app in Google App Engine standard environment. I was planning to have my app in App Engine and my database server in Comp
For connecting through a private IP you need that the app and DB will be in the same network.
You can't achieve that with app engine standard, you need app engine flex for this (see here how to set the network of your app engine flex instances)