Heat a large skillet or saucepan 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 beef bouillon cubes in the 2 cups of hot water (or use 2 cups beef broth if preferred).
Add the dissolved bouillon (or broth), tomato sauce, tomato paste, sugar, dried basil, dried oregano, garlic powder, and salt and pepper to the browned beef. Stir to combine.
Bring the sauce to a simmer, reduce heat to low, and cook gently for about 30 minutes, stirring occasionally.
A few minutes before the sauce is finished, cook the spaghetti in a large pot of boiling salted water according to package directions until al dente; then drain.
Add the drained spaghetti to the sauce and toss until evenly coated. Serve immediately with grated Parmesan if desired.