The pasuk itself records that the herdsmen of Gerar quarreled with Yitzchak's herdsmen over each well he dug, claiming 'the water is ours,' which is why he named the wells Esek and Sitnah (Bereishit 26:18-22).
Rashi explains that the root of the dispute was that the Gerarites engaged Yitzchak in strife and contention over the wells (Rashi on Bereishit 26:20), while the Sforno adds that they were actually pressuring him to abandon the well entirely rather than merely dispute ownership (Sforno on Bereishit 26:20-22).
The Ramban frames the quarrel against the backdrop of the Plishtim having stopped up Avraham's wells after his death only out of enmity once Yitzchak was no longer there to be honored, so that when Yitzchak returned to redig them in the valley, the shepherds of Nachal Gerar claimed the water belonged to them because the well's water seeped from and replenished the flow of the valley stream itself (Ramban on Bereishit 26:17); elsewhere the Ramban also notes that the Torah elaborates at length on this episode of the wells though the plain story seems to add little honor to Yitzchak, since he and his father did these things equally (Ramban on Bereishit 26:20-22).
The Malbim gives a more concrete legal basis for the quarrel: because this well tapped a living spring whose source was in the hills belonging to Avimelech's territory, and because by royal law whatever lay within the earth belonged to the crown, the men of Gerar argued the water was the king's and the nation's, while Yitzchak's shepherds countered that subterranean water is ownerless and belongs to whoever discovers it by digging — each side therefore had its own claim, which is why the well was named Esek (Malbim on Bereishit 26:19). The Malbim elsewhere adds that the Plishtim had stopped up Avraham's original wells only after his death, once Yitzchak was forced to leave, and that Yitzchak's digging revived specifically those wells from the valley of Gerar (Malbim on Bereishit 26:18).
The Gemara in Sanhedrin reads the episode as part of a divine test: Yitzchak's servants sought water and found none until they provoked a quarrel, yet Yitzchak never questioned God's ways despite the hardship (Sanhedrin 111a:9).
Rav Samson Raphael Hirsch observes that digging wells was permitted to anyone, yet the Gerarites raised their claim nonetheless, arguing that while the digging was Yitzchak's, the water itself was theirs — a pattern Hirsch sees repeated against Yitzchak's descendants in later generations (Rav Samson Raphael Hirsch).
The Sefat Emet situates the quarrel as characteristic of Yitzchak's spiritual quality of din (strict judgment), in contrast to Avraham's quality of kindness that drew everything near, noting that the verse of the shepherds of Gerar quarreling exemplifies this aspect of Yitzchak (Sefat Emet, Bamidbar, Korach 27:2), and separately explains that because Avraham's wells had become stopped up, Yitzchak was forced to dig and clear the straight path himself rather than simply walk in his father's footsteps (Sefat Emet, Bereishit, Toldot 6:3).
HaKtav VeHaKabalah situates the naming of the wells within Avraham's broader practice of naming places to commemorate God's kindnesses and to draw those misled by idolatry toward recognizing God's true existence, a background that frames why Yitzchak's wells in Gerar carried such significance (HaKtav VeHaKabalah, Bereishit 26:18).
Midrash Aggadah notes in passing that Yitzchak's relocation from the site teaches that a change of place can be beneficial (Midrash Aggadah, Bereishit 26:20-22).