Steps
1. Bring a pot of salted water to a boil. Cook spaghetti according to package instructions.
2. In a separate medium skillet, heat olive oil over medium-high heat.
3. Add onions and garlic, cooking for 2 minutes.
4. Add carrots and tomatoes to the skillet, cooking for an additional 3-4 minutes until vegetables are tender.
5. Reduce heat to low. In a bowl, whisk egg and Parmesan cheese.
6. Add the cooked pasta and egg mixture to the skillet, stirring quickly for 1-2 minutes.
7. Season with salt and pepper, then serve.