In a large bowl, whisk together flour, sugar, yeast, and salt. In a separate bowl, whisk together warm milk, melted butter, and egg.
Pour the wet ingredients into the dry ingredients and mix until a shaggy dough forms. Turn out onto a lightly floured surface and knead for 5-7 minutes until smooth and elastic.
Place the dough in a greased bowl, cover with plastic wrap, and let it rise in a warm place for 1-1.5 hours, or until doubled in size.
Make the Filling
In a medium bowl, beat together softened cream cheese, sugar, egg yolk, and vanilla extract until smooth and well combined.
Assemble the Danish
Punch down the risen dough and turn it out onto a lightly floured surface. Roll the dough into a large rectangle, approximately 12x18 inches.
Spread the cream cheese filling evenly over two-thirds of the dough, leaving a border.
Fold the un-filled third of the dough over the filling. Then, fold the remaining third over that, like a letter. You should have three layers of dough with filling in the middle.
Gently press down on the dough to seal. Cut the dough lengthwise into 12 equal strips. Twist each strip and then form into a spiral or knot shape.
Place the shaped Danish on a baking sheet lined with parchment paper. Cover loosely with plastic wrap and let them rest for another 30 minutes.
Bake and Glaze
Preheat oven to 375°F (190°C). Brush the Danish with the egg wash.
Bake for 18-20 minutes, or until golden brown and puffed.
While the Danish are baking, whisk together powdered sugar and milk to make the glaze. Adjust consistency with more milk or powdered sugar as needed.
Let the Danish cool slightly on the baking sheet before drizzling with the glaze.
Notes
For a fruitier Danish, you can add a tablespoon of fruit jam to the cream cheese filling.