Preheat the oven to 350°F (175°C). Line a rimmed baking sheet with aluminum foil and lightly coat it with cooking spray.
Melt the butter in a small skillet over medium-low heat. Add the diced onion and cook until soft and translucent. Remove from the heat and allow it to cool completely.
In a large bowl, whisk together the eggs, milk, and breadcrumbs. Let the mixture sit for 5–10 minutes so the breadcrumbs absorb the liquid.
Add the ground beef, cooked onions, ketchup or chili sauce, Italian seasoning, parsley, salt, and pepper. Mix gently until everything is just combined. Avoid overmixing to keep the meatloaf tender.
Shape the mixture into an 8 x 4-inch loaf and place it on the prepared baking pan.
Bake for 40 minutes.
While baking, stir together the ketchup, chili sauce, and brown sugar to make the glaze.
Spread the glaze evenly over the Best Meatloaf Recipe and return it to the oven for another 15–30 minutes, or until the internal temperature reaches 160°F (71°C).
For a caramelized finish, broil for 1–2 minutes if desired.
Let the meatloaf rest for 10 minutes before slicing and serving.