Preheat the oven to 375°F (190°C). Lightly grease a 9x13-inch baking dish with butter or nonstick spray.
In a large skillet over medium heat, cook the chopped bacon until crisp and browned, about 6–8 minutes. Transfer the bacon to a paper towel-lined plate, leaving 1–2 tablespoons of bacon fat in the skillet. If skipping the bacon, use butter or oil instead.
Add the sliced onion to the skillet and cook until soft and lightly caramelized, about 8–10 minutes. Stir in the minced garlic and cook for another 30–60 seconds until fragrant. Remove from heat.
In a medium mixing bowl, whisk together the sour cream, heavy cream or half-and-half, melted butter, salt, pepper, and paprika until smooth.
Stir in 1 cup of the shredded cheddar cheese, the mozzarella if using, and the chopped herbs.
Arrange one bag of frozen pierogies in a single layer in the prepared baking dish.
Scatter half of the onion-garlic mixture and half of the bacon over the pierogies. Spoon about half of the creamy sauce evenly over the top.
Repeat with the remaining pierogies, onion mixture, bacon, and creamy sauce, spreading gently so most of the pierogies are coated.
Sprinkle the remaining 1/2 cup shredded cheddar cheese evenly over the casserole.
Cover loosely with foil and bake for 20 minutes.
Remove the foil and continue baking for another 15–20 minutes, or until bubbling and lightly browned on top.
Let the casserole rest for 5–10 minutes before serving. Garnish with additional chopped herbs just before bringing it to the table.