In a saucepan, whisk together the egg yolks, sugar, cornstarch, salt, and milk over medium heat. Stir constantly until the mixture thickens, about 5–7 minutes. Remove from heat, stir in butter and vanilla. Transfer to a bowl, cover with plastic wrap (pressing it directly onto the surface), and chill until set.
Preheat the oven to 350°F (175°C) and line a baking sheet with parchment paper. In a mixing bowl, cream together butter and sugar until light and fluffy. Beat in eggs and vanilla. In a separate bowl, whisk flour, baking powder, and salt. Add the dry ingredients to the wet mixture, alternating with the milk. Drop tablespoon-sized scoops onto the baking sheet and slightly flatten. Bake for 12–15 minutes, or until edges are lightly golden. Let cool completely.
Heat the cream in a small saucepan until just simmering. Pour over the chopped chocolate in a heatproof bowl. Let sit for 2 minutes, then stir until smooth and glossy. Let it cool slightly before using.
Spread or pipe a dollop of chilled pastry cream onto the flat side of one cookie. Top with another cookie to make a sandwich. Spoon or drizzle ganache over the tops. Chill for 15–30 minutes before serving.