<<xAct`xTensor`;
<< xAct`xCoba`;
<< xAct`xTras`;

$PrePrint=ScreenDollarIndices;
DefManifold[Md,4,{a,b,c,d,e,l,i,j,k,p,u,v}];
DefMetric[-1,g[-a,-b],CD,{";","∇"},WeightedWithBasis->AIndex];
PrintAs[RiemannCD]^="R";
PrintAs[RicciCD]^="R";
PrintAs[RicciScalarCD]^="R";
PrintAs[ChristoffelCD]^="Γ";
PrintAs[EinsteinCD]^="G";
org[expr_]:=ToCanonical[ContractMetric[expr],UseMetricOnVBundle->None];

DefTensor[φ[],Md];
DefConstantSymbol@{λ,β};
DefScalarFunction[f];

LEH=RicciCD[-a,-b]*g[a,b];
Lφ=2CD[-a]@φ[]CD[a]@φ[];
LGB=(λ^2)(f[φ[]])*(RiemannCD[a,b,c,d]RiemannCD[-a,-b,-c,-d]+RicciScalarCD[]RicciScalarCD[]-4RicciCD[a,b]RicciCD[-a,-b]);

L=LEH-Lφ+LGB
Ldet= Sqrt[-Det[g[]]]*L

Eombg=VarL[g[a,b]][L]//ContractMetric//Simplification

GBterm=NoScalar@EulerDensity[CD,4]
Gab=VarL[g[a,b]][RicciScalarCD[]]
Sab=VarL[g[a,b]][2CD[-a]@φ[]CD[a]@φ[]]
Hab=VarL[g[a,b]]@(f[φ[]]*GBterm)//org//FullSimplification[]

Eab=Gab-Sab+(λ^2) Hab//FullSimplification[]

Chart

DefChart[Backg,Md,{0,1,2,3},{t[],r[],θ[],ψ[]}];

DefScalarFunction/@{n ,δ,m};
gB=DiagonalMatrix[{-n[r[]]Exp[-2δ[r[]]],(1/(n[r[]])),((r[])^2),((r[])^2)((Sin[θ[]])^2)}];

(Metricgb=CTensor[gB,{-Backg,-Backg}])[-a,-b]

InvMetricgb=Inv[Metricgb]

MetricgbCD=CovDOfMetric[Metricgb];

PDgb=PDOfBasis[Backg]

RicciMetricgbCD=Ricci[MetricgbCD]
RiemannMetricgbCD=Riemann[MetricgbCD]
RicciScalarMetricbgCD=RicciScalar[MetricgbCD]

Jose: Note how the ϕ function is blue. It should be declared as a scalar function, so I do it here:

DefScalarFunction[ϕ]

rules={
g[a_?DownIndexQ,b_?DownIndexQ]:>Metricgb[a,b],g[a_?UpIndexQ,b_?UpIndexQ]:>InvMetricgb[a,b],Det[g[]]->Det[gB],
CD[a_?DownIndexQ]:>MetricgbCD[a],PD[a_?DownIndexQ]:>PDgb[a],
RicciCD[a_?DownIndexQ,b_?DownIndexQ]:>RicciMetricgbCD[a,b],
RicciScalarCD[]:>RicciScalarMetricbgCD[],RiemannCD[a_?DownIndexQ,b_?DownIndexQ,c_?DownIndexQ,d_?DownIndexQ]:>RiemannMetricgbCD[a,b,c,d],
φ[]:>ϕ[r[]]
};

Jose: Here we have a sum of 26 terms:

Eab//SeparateMetric[]

Jose:  When sums take long to evaluate, it is frequently a good idea to work separately on the terms of the sum and then add them again:

list=Apply[List,%]

Jose: Replace the rules on each individual term:

list=list/.rules//FromBasisExpand//ToCCanonical

Now we add back the 26 objects, and simplify a bit with Together:

result=Together@Total[list]

This is the result you were looking for:

Head[result]