Preheat oven to 350F.
Cut fresh spinach in half and cook in a large pot of boiling water for 30 seconds until wilted. Rinse the spinach under running cold water until cool to handle. Drain it in a colander and squeeze out excess water. Set aside.
In a large skillet, melt butter over medium-high heat until melted butter turns bubbly, about 1-2 minutes. Sauté onion and garlic until fragrant, about 2 minutes.
Add flour and stir well to combine. Stir in heavy cream and ¼ cup of Parmesan. Stir constantly and turn the heat down to medium. Bring the mixture to a simmer until smooth and thickened, about 4-5 minutes. Season with salt and pepper to taste.
Stir in spinach and toss well to coat. Cook for 1 -2 minutes until heated through.
Transfer spinach mixture to a 9-inch square baking pan and top with mozzarella and remaining ¼ cup Parmesan. Bake for 20 minutes until cheese is melted and golden brown. Alternatively, you can place it under the broiler on high for 2-3 minutes until melted and golden. Keep a close eye on the broiler because things can burn quickly.
