In a mixing bowl, combine warm water, active dry yeast, and sugar. Let it sit for about 5 minutes until frothy.
Stir in the melted butter and chopped rosemary. Gradually add the flour and salt, mixing until a dough forms.
Knead the dough on a floured surface for about 5 minutes until smooth and elastic.
Place the dough in a lightly greased bowl, cover with a damp cloth, and let it rise in a warm area for about 30 minutes, or until doubled in size.
Preheat the oven to 425°F (220°C) and line a baking sheet with parchment paper.
Once the dough has risen, punch it down and divide it into 8 equal pieces. Roll each piece into a long rope (about 24 inches).
Place a cube of mozzarella at the center of each rope, pinch the dough around the cheese, and roll it into a pretzel shape. Ensure the cheese is fully enclosed.
In a saucepan, bring about 4 cups of water to a gentle boil. Stir in the baking soda.
Carefully place each pretzel into the boiling water for about 30 seconds, then use a slotted spoon or tongs to remove and place them back on the baking sheet.
Brush the tops with beaten egg and sprinkle with grated Parmesan and coarse sea salt.
Bake the pretzels for 12-15 minutes or until golden brown.
Let them cool slightly before serving. Enjoy with your favorite dipping sauce!