Preheat oven to 350°F and grease a baking dish.
Heat olive oil in a pan over medium heat and sauté minced garlic for 1 minute until fragrant.
Add marinara sauce and Italian seasoning to the pan; warm thoroughly for 3-4 minutes.
If using frozen ravioli, boil for 5 minutes for al dente texture. Fresh ravioli can be used directly.
In a bowl, mix together ricotta cheese, egg, Parmesan cheese, and chopped fresh basil.
Layer half the sauce in the bottom of the baking dish, then add ravioli, spread cheese mixture over ravioli, add remaining ravioli, and top with remaining sauce.
Sprinkle mozzarella cheese evenly over the top.
Bake for 45 minutes, covering with foil if cheese browns too quickly.
Let rest for 5 minutes before serving.