Bring a large pot of salted water to a boil.
Add the spaghetti and cook according to the package instructions.
Drain and set aside.
Heat olive oil in a large skillet over medium heat.
Add the ground beef and cook, breaking it apart with a spoon, until browned (about 5–7 minutes).
Drain excess fat if needed.
Add the diced onion and cook for 3–4 minutes until softened.
Stir in the garlic and cook for another minute.
Stir in the diced tomatoes, crushed tomatoes, and tomato paste.
Add the Italian seasoning, salt, and black pepper.
Bring the sauce to a simmer and cook for 15 minutes, stirring occasionally.
Bring the sauce to a simmer and cook for 15 minutes, stirring occasionally.
Toss the cooked spaghetti with the sauce, or serve the sauce on top.
Garnish with Parmesan cheese if desired.