Cook the bacon, onion, and garlic. In a large skillet over medium heat, cook the chopped bacon for 5-6 minutes, until most of the fat is rendered, but the bacon is still tender (not crispy). Then, add the diced onion and continue cooking for another 5 minutes until the onion is soft and translucent. Stir in the garlic and cook for 30 seconds, just until fragrant.
Add the green beans and liquid. Pour the canned green beans, with their liquid, into the skillet. Then, stir in the sugar and vinegar, making sure everything is well combined.
Simmer. Simmer the mixture uncovered for 7-10 minutes, or until most liquid evaporates and the beans tender. Stir occasionally to prevent sticking.
Check for seasoning. Taste and adjust the seasoning as needed. Depending on the saltiness of your bacon and canned green beans, you may need to add more salt. Serve immediately.