Between 1744 and 1769 the Gorkha kingdom, under Prithvi Narayan Shah, took the Kathmandu Valley from its three Malla kingdoms and made it the capital of a new state. The campaign lasted twenty-five years, and it was won by controlling the ways into the valley rather than by winning open battles inside it. The Gorkhali lost several of those.
Thankot's part in this is specific and unglamorous. It sits at the foot of the western pass, which is the easiest way into the bowl. Whoever holds it can close that road. In a campaign decided by supply and blockade, that made a small rim town matter far more than its size would suggest.
Chandragiri, the ridge above Thankot, carries the campaign's most repeated story: that Prithvi Narayan Shah stood on the summit, saw the valley laid out below him, and formed the intention that became the unification of Nepal. That episode is chronicle tradition. The dates below are not.