In a stand mixer bowl, combine warm water and sugar.
Sprinkle yeast over the top and stir gently.
Let sit for 5 minutes until foamy. If not foamy, start over with new yeast.
Add flour and salt. Mix on low speed until a shaggy dough forms.
Increase speed to medium and mix for 5 minutes until elastic and sticky.
Brush a large bowl with 2 tablespoons olive oil.
Transfer dough to the bowl using a spatula.
Lightly coat the top of the dough with oil.
Cover and let rise 1 to 1½ hours until doubled in size.
Brush a 9x13-inch baking dish with 2 tablespoons olive oil.
Oil your hands and gently fold the dough into itself to form a rough ball.
Transfer dough to the prepared pan and turn to coat in oil.
Press dough toward the edges of the pan.
Let it rest briefly if it springs back, then press again to fit the pan.
Cover and let rise about 45 minutes until doubled.
Preheat oven to 425°F during the last 30 minutes of rising.
Drizzle remaining 2 tablespoons olive oil over the dough.
Oil your fingers and press deep indentations across the surface.
Sprinkle with flaky sea salt and chopped rosemary, if desired.
Bake 20–30 minutes until golden brown.
Cool slightly before slicing and serving.