Lots of presidents have term limits–either one term or two, typically (and with variations in whether an interim out of office permits a later return). But terms limits on prime ministers are rare. The only cases that come to mind are Botswana and South Africa. Just to confuse things, those countries call their chief executive “president”; however, they (together with their cabinets) are responsible to the majority in the assembly, and thus these are prime ministers in the sense of heads of government whose political survival depends on parliamentary confidence.
Given the small number of cases, there may not be much of a literature in political science or law about term-limiting prime ministers. I am wondering if readers are aware of anything that one should read to understand the implications and possible motivations for term limits on assembly-responsible executives.
The question of term-limiting the prime minister comes up now and then in Israel, including in the current campaign, where New Hope Party leader Gideon Saar has said the first bill he would advance if he becomes Prime Minister would set a term limit of eight years. The idea has come up also in the past. Once upon a time, apparently even none other than Benjamin Netanyahu thought it was a good idea; this was, of course, before serving 2009–21 (and perhaps beyond) in the position. The issue comes up at times elsewhere as well (such as Grenada and St. Kitts and such a measure was passed, controversially, in Iraq). (Edit: in a comment, JD notes that Belize and Thailand have term limits in their prime ministers.)
I would generally suspect that the logic of term limits (prevent one person from monopolizing power) fits poorly with the logic of parliamentarism (the head of government serves at the pleasure of the assembly majority). But apparently any such poor fit does not prevent the idea surfacing here and there. It would be especially challenging to formulate a workable term-limit provision in a country that often has early elections–sometimes very early and frequent ones–like Israel.