Heat a large skillet over medium heat. Add the ground beef and cook, breaking it into small pieces, until browned, about 8–10 minutes. Drain excess fat.
Meanwhile, dissolve the 2 beef bouillon cubes in 2 cups hot water; add the bouillon mixture to the browned beef.
Stir in the tomato sauce, tomato paste, sugar, dried basil, dried oregano, a pinch of garlic powder, and salt and pepper to taste.
Reduce heat to low and simmer the sauce, uncovered, for about 30 minutes, stirring occasionally.
During the last few minutes of the sauce's simmer, cook the spaghetti in a pot of boiling salted water according to package directions until al dente; drain well.
Add the drained spaghetti to the sauce and toss to coat evenly. Serve warm with grated Parmesan if desired.