Heat olive oil in a large skillet over medium-high heat and brown the ground beef, breaking it up as it cooks, about 6 minutes. Drain excess fat.
Add onion and garlic to the skillet and cook until softened, about 3 minutes.
Stir in tomato paste, crushed tomatoes, oregano, basil, salt, and pepper. Reduce heat to low and simmer for 20 minutes.
While the sauce simmers, cook spaghetti according to package directions. Reserve 1/2 cup pasta water before draining.
Toss drained pasta with the sauce, adding a splash of pasta water if needed to loosen it up.
Serve topped with freshly grated Parmesan.