Heat the olive oil in a large skillet over medium heat.
Add the chopped onion and minced garlic to the skillet. Sauté for about 3-4 minutes or until the onion is translucent.
Add the ground beef to the skillet, breaking it apart with a spoon. Cook until browned, about 5-7 minutes. Drain excess fat if necessary.
Stir in the diced zucchini, diced tomatoes, oregano, basil, salt, and pepper.
Cook for another 10-15 minutes, stirring occasionally, until the zucchini is tender and the flavors are combined.
If using, sprinkle the shredded mozzarella cheese on top of the mixture in the skillet during the last 2 minutes of cooking. Cover to allow the cheese to melt.
Once everything is cooked and the cheese has melted, remove from heat and serve hot.