There are some examples of how to use VarD in the file xAct/Documentation/English/xTensorDoc.nb that's included in the distribution. However when varying with respect to the metric, you have to be careful about implicit dependence. This is made simpler by using xPert to find the 1st order perturbation — which handles all the implicit dependencies — and then varying with VarD. There are two examples in the repo
https://github.com/xAct-contrib/examples , named Lagrangian-variation-xPert-VarD.nb and ActionVariation_Metric_Fields.nb . Also, the package xTras introduced the function VarL which automates this operation.