Step 1: Prepare the dough by combining flour, sugar, yeast, and salt in a large bowl. Add warm water and olive oil. Knead until smooth and elastic, about 8–10 minutes. Cover and let rise for 1 hour or until doubled in size.
Step 2: While the dough rises, prepare the filling. Heat a skillet over medium heat, add onion and garlic, and sauté for 2–3 minutes until softened. Add ground beef, oregano, basil, red pepper flakes, salt, and pepper. Cook until beef is browned and fully cooked. Drain any excess fat and set aside to cool slightly.
Step 3: Preheat the oven to 400°F (200°C). Line a baking sheet with parchment paper.
Step 4: Roll the risen dough into a large rectangle, about 12x16 inches. Spread a thin layer of pizza sauce on the dough if desired.
Step 5: Evenly distribute the cooked beef mixture over the dough, leaving a 1-inch border around the edges. Sprinkle shredded mozzarella and grated Parmesan over the beef.
Step 6: Carefully roll the dough into a log, starting from the long side, and pinch the edges to seal the stromboli completely.
Step 7: Transfer the stromboli to the prepared baking sheet. Brush the top with beaten egg and sprinkle with sesame seeds or dried oregano if desired.
Step 8: Bake in the preheated oven for 25–30 minutes, or until the dough is golden brown and cooked through. Let it cool for 5 minutes before slicing.