There are two options and both work well, only the texture is different.
Divide cooled caramelized walnuts in half.
The first option is to finely ground one-half of caramelized walnuts and finely chop the second half (will use this half for sprinkling and decoration) - this is how my mom makes the filling.
What I like to do, to get more smoother filling is to put the first half of caramelized walnuts into a food processor and process until the buttery texture is formed (it won't be completely smooth, there will be still bits of caramelized sugar and that's ok) and finely chop the 2nd half. It's up to you.
Next, pour milk (leave about 5 tablespoons) in a large saucepan and on medium heat bring to a light boil.
In the meantime rest of the milk (5 Tbsp) mix with vanilla pudding powder, sugar, cornstarch, and vanilla extract.
Pour mixture into hot milk and cook, stirring constantly, about 3-4 minutes until thick.
Leave it to cool. Beat butter until creamy and smooth and mix into cooled pudding. Add in caramelized walnuts (finely ground or in the buttery form) and mix everything until fully incorporated. Divide the filling into 3 parts.