Preheat your oven to 350°F and lightly grease a 9x13-inch baking dish.
Cook the spaghetti in salted water according to package directions until al dente. Drain and set aside.
In a large skillet over medium heat, cook the ground beef and chopped onion until the beef is browned and the onion is soft.
Add the garlic and cook for about 30 seconds until fragrant.
Stir in the pasta sauce, Italian seasoning, salt, and black pepper. Let the sauce simmer for 5 minutes.
In a mixing bowl, combine the softened cream cheese, cottage cheese or ricotta, and sour cream until smooth and creamy.
Place half of the cooked spaghetti in the prepared baking dish.
Top with the sliced butter, then spread the creamy cheese mixture evenly over the spaghetti.
Add the remaining spaghetti on top of the cheese layer.
Pour the meat sauce evenly over the spaghetti.
Sprinkle the mozzarella cheese and Parmesan cheese over the top.
Bake uncovered for 30 to 35 minutes, or until hot and bubbly and the cheese is melted.
Let it rest for 10 minutes before slicing and serving.