Steps
1. Cook pasta in boiling salted water according to package instructions until al dente. Drain and set aside.
2. Heat olive oil in a pan over medium heat. Add sliced onions and sauté until soft and golden, about 5-7 minutes.
3. Beat the egg in a small bowl with a pinch of salt and pepper.
4. Reduce heat to low, add the cooked pasta to the pan with onions.
5. Pour the beaten egg over the pasta and quickly stir to coat the pasta evenly, creating a creamy sauce. Cook for 1-2 minutes until eggs are just set.
6. Season with additional salt and pepper as needed.
7. Serve immediately, optionally topped with grated Parmesan or fresh herbs.