Preheat your oven to 350°F (175°C).
In a large cooking pot, heat the olive oil over medium heat. Add the diced onion and minced garlic, sautéing until the onion becomes translucent, about 5 minutes.
In a large mixing bowl, combine the drained navy beans, root beer, ketchup, brown sugar, yellow mustard, black pepper, and smoked paprika (if using). Mix well to combine.
Once the onions and garlic are ready, add them to the bean mixture and stir until everything is well incorporated.
Transfer the bean mixture into a 9x13 inch baking dish, spreading it evenly.
Cover the baking dish with aluminum foil and bake in the preheated oven for 30 minutes.
After 30 minutes, remove the foil and bake for an additional 30 minutes, allowing the beans to thicken and develop a rich flavor.
Once done, remove from the oven and let it sit for a few minutes before serving. Adjust salt to taste if necessary.