Preheat oven to 350°F (175°C). Cook the spaghetti according to package instructions, drain, and set aside.
Cook the ground beef in a skillet with olive oil until browned. Add chopped onion and garlic, cooking until softened.
Add marinara sauce to the beef mixture and stir to combine. Let it simmer for a few minutes.
Prepare the creamy layer: In a bowl, combine cream cheese, sour cream, and cottage cheese. Mix until smooth.
Assemble the casserole: Layer half of the cooked spaghetti in a greased baking dish. Top with half of the creamy cheese mixture, followed by half of the marinara sauce mixture. Repeat the layers.
Top with shredded mozzarella and Parmesan cheese.
Bake for 25-30 minutes, or until bubbly and golden on top
Let it rest for 5-10 minutes before serving. Enjoy!