Set your oven to 375°F (190°C) to warm up while you start cooking.
In a large skillet over medium heat, brown the ground beef until fully cooked.
Add the chopped onion and minced garlic to the beef and cook until the onion becomes soft and translucent.
Pour in the marinara sauce, stir everything together, and let it simmer gently for about 5 minutes to combine the flavors.
Cook the cheese-filled ravioli according to the package directions, drain, and keep aside.
Lightly grease your casserole dish, then spread a thin layer of the beef and marinara mixture on the bottom.
Arrange a single layer of cooked ravioli over the sauce.
Sprinkle shredded mozzarella and grated Parmesan generously over the ravioli.
Repeat layering the beef sauce, ravioli, and cheeses until all ingredients are used, finishing off with a cheese layer on top.
Season the entire casserole with salt and pepper according to your taste.
Cover the dish with aluminum foil and bake in the oven for 20 minutes.
Remove the foil and continue baking uncovered for another 10 minutes until the cheese melts and turns golden and bubbly.
Take the casserole out of the oven and allow it to rest for a few minutes before serving.
Garnish with fresh basil leaves if you like, then serve warm and enjoy!