There was a famine in the country—not the one that happened before in Abraham's time, but a later one. So Isaac moved to Gerar in the territory of Abimelech, king of the Philistines.
Read & study FBV 26:1And there was a famine in the land, besides the first famine that was in the days of Abraham. And Isaac went unto Abimelech king of the Philistines, unto Gerar.
Read & study ASV 26:1