In a skillet, cook ground beef over medium heat until browned. Drain excess fat.
Add chopped onion and minced garlic to the skillet. Cook until onion is translucent.
Stir in diced tomatoes, tomato sauce, dried oregano, and dried basil. Simmer for 10 minutes.
In a baking dish, layer half of the cooked pasta, followed by half of the meat sauce. Spread ricotta cheese over the meat sauce, then sprinkle with half of the mozzarella and Parmesan cheeses.
Repeat the layers with the remaining pasta, meat sauce, and cheeses.
Bake in the preheated oven for 20-25 minutes, or until the cheese is melted and bubbly.
Let the casserole cool for a few minutes before serving.
Notes:
This casserole can be made ahead and refrigerated. Just bake it when you're ready to serve.