Preheat your oven to 350°F (175°C).
Cook spaghetti according to package instructions until al dente; drain.
In a large skillet, brown the ground beef over medium heat.
Add the diced onion and minced garlic; cook until translucent.
Stir in the marinara sauce and Italian seasoning.
In a large bowl, combine cooked spaghetti, meat sauce, and ricotta cheese.
Spread half of the mixture in a greased baking dish.
Sprinkle half of the mozzarella cheese over the mixture.
Add the remaining spaghetti mixture and top with the rest of the mozzarella cheese.
Bake for 30 minutes or until the cheese is bubbly and golden.