Cook spaghetti according to package directions. Drain and set aside.
In a large pot or Dutch oven, heat olive oil over medium heat. Add onion and cook until softened, about 5 minutes. Add garlic and cook for 1 minute more.
Add ground beef to the pot and cook, breaking it up with a spoon, until browned.
Stir in crushed tomatoes, oregano, basil, salt, and pepper. Bring to a simmer, then reduce heat and cook for 30 minutes, stirring occasionally.
Serve the spaghetti sauce over the cooked spaghetti. Garnish with grated Parmesan cheese, if desired.
Notes
For a richer flavor, add a tablespoon of tomato paste to the sauce. You can also add other vegetables, such as mushrooms or bell peppers.