Preheat the oven to 375°F.
In a large skillet over medium heat, cook the ground beef or sausage with the diced onion until browned. Add the minced garlic and cook for an additional minute. Drain excess fat if necessary.
Stir in the marinara sauce and let it simmer for about 5 minutes.
In a mixing bowl, combine the ricotta cheese, egg, oregano, basil, salt, and pepper. Mix until well combined.
To assemble the mini lasagna cups, spray a muffin tin with cooking spray.
Cut the lasagna noodles into thirds. Place one piece of noodle in the bottom of each muffin cup.
Add a spoonful of the meat sauce, followed by a spoonful of the ricotta mixture, and a sprinkle of mozzarella cheese.
Repeat the layers until the muffin cups are filled, finishing with a layer of mozzarella and a sprinkle of Parmesan cheese on top.
Bake in the preheated oven for 20-25 minutes, or until the cheese is melted and bubbly.
Let cool for a few minutes before carefully removing the lasagna cups from the muffin tin.
Garnish with fresh basil leaves if desired.