google compute engine – I need to change OS of my VM Instance, but I am using free tier and just wondering if I am allowed to remove and recreate VM with my desire OS?

You are billed (including allocation of free tier) based on the running time of the VM instances.

If you fully remove your old VM and deploy a new one within the limits of the free tier (for example making sure you use the correct type), you won’t be charged.

If however you kept your original VM while you deployed and configured the replacement and only then deleted the original, you may be charged as for a period of time you had two VMs running – although if you also had some free credit then it is possible the second VM could consume the credit and the first one would be consuming the free tier allocation.

Think of the free tier as a bucket, if you pour water in the bucket (deploy a VM), you won’t see a charge. If you the pour more water in and it overflows, you will be charged for the spillage. If however you pour water in, but then empty the bucked before you pour more water in, it won’t overflow and you won’t be charged.

Note this is on contrast to free credit, which is more like eating a chocolate bar, once you eat it, it’s gone.