This is a classic filling for a Lemon Meringue Pie
Combine the sugar and cornstarch in a saucepan. Stir in the water.
Cook over medium heat, stirring frequently, then constantly as it gets hotter, until the mixture thickens and comes to a boil. Boil, stirring, for 1 minute.
Put the egg yolks in a small bowl. Stir about 1 cup of the boiling sugar mixture into the yolks.
Return the hot yolk mixture to the saucepan. Bring to a "thick" boil and boil, stirring constantly, for 1 minute. The filling should be very thick, almost like cooled pudding or soft mashed potatoes.
Remove the filling from the heat, and add the butter, zest, juice, and vanilla, stirring until the butter melts. Spoon the filling into the crust.