Bring a large pot of salted water to a boil and cook the spaghetti according to the package instructions until al dente. Drain and set aside.
Heat the olive oil in a large skillet or saucepan over medium heat. Add the chopped onion and cook until softened, about 3–4 minutes.
Stir in the minced garlic and cook for 30 seconds until fragrant.
Add the ground beef and cook until browned, breaking it into small pieces with a spoon. Drain any excess fat if needed.
Stir in the crushed tomatoes, Italian seasoning, salt, and black pepper. Simmer for 20–25 minutes, stirring occasionally until the sauce thickens.
Spoon the Bolognese sauce over the cooked spaghetti or toss the pasta with the sauce until evenly coated.
Serve hot, garnished with grated Parmesan cheese and fresh basil or parsley if desired.