Heat oil in a large ovenproof skillet or Dutch oven over medium-high heat.
Add chopped onion and cook until softened, about 3–4 minutes.
Stir in minced garlic and cook about 30 seconds until fragrant.
Add ground beef and break up with a spoon; brown until no longer pink, about 6–8 minutes.
Drain excess fat if desired, leaving a bit for flavor.
Stir in ketchup, brown sugar, molasses (if using), Worcestershire sauce, smoked paprika, and mustard; combine thoroughly.
Pour in canned baked beans (or cooked beans and tomato sauce) and stir to coat the meat evenly.
If the sauce seems too thick, add up to 1/4 cup water or beef broth and stir.
Bring to a gentle simmer, then reduce heat and let simmer uncovered 15–20 minutes, stirring occasionally to meld flavors.
Optional: For a caramelized top, transfer the skillet to a preheated 375°F (190°C) oven and bake 10–12 minutes.
Remove from heat, let rest 5 minutes, garnish with parsley and serve hot.