In a saucepan, whisk together milk, sugar, cornstarch, salt & vanilla. Cook on medium heat, stirring constantly. Once the mixture is hot, lower the heat to medium-low to prevent the bottom from burning. Continue cooking until mixture thickens. Remove from heat & cool. When cooled, spread the pudding over puff pastry using a spoon to smooth it out.