Preheat the oven to 375 degrees. Grease a 9 inch deep dish pie plate or square pan.
Heat the oil in a small skillet over medium heat. Add onion and ground beef and cook until beef is well browned and no pink remains. Add the garlic cloves and cook until fragrant, stirring often, about 1 minute. Season to taste with salt and pepper. If there is excess grease at the bottom of the pan, drain it off.
Spread ricotta evenly across the bottom of the prepared pan. Spread cooked onion and beef mixture on top of ricotta.
Layer ½ the tomato sauce followed by ½ the mozzarella over the beef mixture, then repeat.
Sprinkle Parmesan cheese over the last mozzarella layer. Sprinkle evenly with dried Italian herbs.
Bake for 20 minutes or until browned and bubbly. Remove, sprinkle with fresh basil, and serve warm with crackers, garlic bread, or bread sticks.