In a large skillet over medium heat, brown the ground beef with the chopped onion until the meat is cooked through and the onion is translucent, about 5-7 minutes. Drain any excess fat.
Add the minced garlic and cook for another minute until fragrant.
Stir in the tomato sauce, diced tomatoes, beef broth, Italian seasoning, salt, and black pepper. Bring the mixture to a simmer.
Add the uncooked elbow macaroni to the skillet. Cover and cook for 10-12 minutes, stirring occasionally, until the pasta is tender and has absorbed most of the liquid.
Remove the skillet from heat and stir in the ricotta cheese until well combined.
Sprinkle the mozzarella and Parmesan cheese on top. Cover the skillet and let it sit for 5 minutes to allow the cheese to melt.
Garnish with fresh basil leaves if desired and serve hot.