Preheat the oven to 450°F. Lightly oil a rimmed baking sheet. Line up the green beans side by side on the baking sheet in two rows.
Drizzle the green beans with olive oil and roll the green beans gently with your hands until they're evenly coated with the olive oil.
Place the tray on the middle rack in the oven, and roast the green beans for 15-20 minutes, shaking the pan every 5 minutes, until they become tender and lightly browned in areas. Flipping them with a metal spatula helps them caramelize evenly.
Add the chopped garlic on top of the green beans. Roast for another few minutes until the garlic turns golden; flip the beans with the garlic every couple of minutes. If you have bigger green beans than the ones I used, they will take a little longer to cook.
When the green beans are done, remove them from the oven and transfer them to a bowl. Sprinkle with salt and pepper, seasoning to taste. Serve immediately while still warm.
Notes
Don't overcrowd the pan: To ensure your green beans get that perfect roasted texture, ensure they're in a single layer. Overcrowding will cause them to steam instead of roast. If you make a double batch, use two sheet pans.
Flip the beans: Tossing them halfway through cooking helps them cook evenly on all sides.
Watch the garlic: I add the garlic a few minutes before the green beans are done to prevent burned garlic. Dark brown garlic will be bitter, so observe it during the last few minutes. The garlic should be golden before you remove the green beans from the oven.
Refrigerator: Refrigerate leftover roasted green beans in an airtight container for up to 3 days.
Reheating: Reheat them in a 375°F oven for about 10 minutes or until warmed.