As one of the comments noted, this is probably "Yesterday's Gods" (1997) by John Mina and William R. Forstchen, published in Last Stand (Bolos 4) edited by Bill Fawcett
Lt. Commander George Reston shot down when his squadron unexpectedly runs into a Xermex hive during an attack against an enemy base on a world that had, 1452 years previously, been a human colony. He ejects and lands along with Fay, the AI core of his doomed fighter. (Who disapproves of George's attitude and womanizing.)
He treks toward a distant range of mountains seeking a place to shelter and hide, and is found by human survivors of the colony. The elders who lead them are called "Techanish" and are descendants of a group of technicians of the 23rd Dinochrome Mech Brigade (Bolos); they show George an original helmet to prove it.
George is brought to their temple, decorated with all manner of ancient non-functional military equipment, and tested for his secret knowledges, which is lacking. At that moment a Xermex patrol, which has been tracking him, attacks the humans. Fay and George desperately try to unlock the D-class Bolo that is hidden in the temple, failing until George unconsciously repeats the unit slogan of the 4th of the 23rd, "Come on you bastards!" which is the final part of the key.
With the Bolo activated, crewed by George (commander) and two of the elders (gunner and technician), the Xermex hovers are shot down and their ground troops are killed. Knowing that the Xermex queen will immediately send reinforcements, George orders an attack on their main base, which they press home despite increasingly heavy counterattacks until they are stopped, out of ammo, just as the cavalry arrive.