Preheat the oven to 350°F
Cook spaghetti until al dente
Drain the spaghetti
Brown ground beef in a skillet
Add chopped onion and garlic
Stir in marinara sauce
Season with salt, pepper, and Italian seasoning
Mix the spaghetti with the sauce
Stir in ricotta or cottage cheese
Add half the spaghetti mixture to a baking dish
Sprinkle with mozzarella and Parmesan
Add the remaining spaghetti mixture
Top with more mozzarella and Parmesan
Bake for 25 to 30 minutes
Let it rest for a few minutes before serving
