"which the L-rd your G-d gives to you": in your merit.

"and you inherit it and you inhabit it": As a reward for inheriting it, you will inhabit it.

"and you say: I shall place over myself a king, as all the nations that are around me": R. Nehorai says: This verse speaks in denigration of Israel, as in (I Samuel 8:7) "For it is not you (Samuel) that they have rejected (in asking for a king), but it is Me whom they have rejected from reigning over them."

R. Yehudah said: Is it not a mitzvah of the Torah to ask for a king? viz. (Ibid. 15) "Place shall you place over yourself a king, whom the L-rd your G-d shall choose"? Why, then, was Israel punished for this in the days of Samuel? — Because they (the "ignoramuses" of that generation) preempted them (the elders) by placing "like all the nations that are around us" (before "to judge us").