Preheat oven to 375°F (190°C).
Heat olive oil in a skillet over medium heat. Sauté onion and garlic for 2–3 minutes. Add ground beef, season with salt, pepper, and Italian seasoning, and cook until browned. Stir in tomato sauce and simmer 5 minutes.
In a greased baking dish, layer sliced potatoes or pasta. Spread the beef mixture over the top. Sprinkle mozzarella and Parmesan cheese evenly over the beef.
Bake uncovered for 20–25 minutes, or until cheese is melted and bubbly.
Garnish with chopped parsley and serve hot.
