Add the ground beef and chopped onion to a large skillet or Dutch oven over medium heat. Cook until the beef is browned and the onion has softened, breaking the beef apart as it cooks. Drain excess grease if needed.
Stir in the minced garlic and cook for about 30 seconds, until fragrant.
Add the dry orzo, Italian seasoning, salt, and pepper. Stir well so the orzo is coated in the beef mixture.
Pour in the tomato sauce and water. Stir everything together, scraping the bottom of the pan so nothing sticks.
Bring the mixture to a gentle simmer. Cover and cook for 10 to 12 minutes, stirring often, until the orzo is tender and most of the liquid has been absorbed. If the pan starts to look dry before the orzo is cooked, add a small splash of water.
Turn the heat to low. Stir in the heavy cream, pesto, chopped spinach, and parmesan cheese.
Cook for another 2 to 3 minutes, stirring often, until the spinach is wilted and the sauce is creamy.
Taste and add more salt or pepper if needed. Serve warm with fresh basil, red pepper flakes, extra parmesan, or all three.