Cook the spaghetti according to package instructions until al dente. Drain and set aside.
In a large skillet, cook the ground beef over medium heat until browned. Add chopped onion and minced garlic, and sauté until the onion is translucent.
Stir in the marinara sauce, Italian seasoning, salt, and pepper. Let simmer for 5 minutes.
In a large baking dish, layer half of the cooked spaghetti, half of the sauce mixture, and half of the mozzarella and parmesan cheeses. Repeat the layers.
Bake in the preheated oven for 20-25 minutes, or until the cheese is melted and bubbly.
Let it cool for a few minutes before serving. Enjoy!
Notes
Feel free to add more vegetables or adjust the spices to your taste.