Bring a large pot of salted water to a boil and cook the spaghetti according to the package directions.
Meanwhile, heat the olive oil in a large skillet over medium heat. Add the garlic and onion and cook, stirring occasionally, until the onion is softened, about 5 minutes.
Stir in the oregano, salt, and pepper and cook for 1 minute more.
Drain the cooked spaghetti and add it to the skillet. Toss to combine with the onion mixture.
Sprinkle the Parmesan cheese over the top and serve.
Interesting Facts
Onion Spaghetti is a simple and quick dish that can be served as a side or main course.