Preheat your oven to 375°F (190°C). Line a baking tray with parchment paper.
In a mixing bowl, combine the softened butter, minced garlic, chopped parsley, salt, and black pepper. Mix well until all ingredients are fully incorporated.
Using a knife, slice the sourdough loaf into thick pieces, about 1 inch thick, without cutting all the way through the bottom.
Generously spread the garlic butter mixture between the slices of the loaf and on the top of the bread. If using, sprinkle grated Parmesan cheese on top.
Wrap the entire loaf in aluminum foil, leaving the top exposed. Place it on the prepared baking tray.
Bake in the preheated oven for about 15 minutes. Then, remove the foil and bake for an additional 10 minutes, or until the bread is golden brown and crispy on top.
Remove from the oven, let cool slightly, and serve warm.