Preheat your oven to 400°F (200°C). Line a large baking sheet with parchment paper for easier cleanup, if desired.
In a large mixing bowl, toss the trimmed green beans with olive oil until evenly coated. Add the minced garlic, salt, pepper, and red pepper flakes (if using). Toss again to distribute the seasonings.
Spread the seasoned green beans in a single layer on the prepared baking sheet. Ensure they are not overcrowded, as this will steam them rather than roast them. Use two baking sheets if necessary.
Roast for 12-18 minutes, or until the green beans are tender-crisp and slightly browned in spots. The exact time will depend on the thickness of your beans and your oven.
Remove the baking sheet from the oven. Sprinkle the grated Parmesan cheese over the hot green beans and toss gently to coat. Return to the oven for another 1-2 minutes, just until the cheese is melted and slightly golden.