Step 1
Cook 1 medium white or yellow onion, thinly sliced, 1 head of garlic, cloves separated, coarsely chopped, ¼ cup extra-virgin olive oil, and 1 Tbsp. Diamond Crystal or 1¾ tsp. Morton kosher salt in a large Dutch oven or other heavy pot over medium, stirring occasionally, until onion is translucent, 5–8 minutes.
Step 2
Add 1 lb. green beans, trimmed, cut into 2″ pieces, one 28-oz. can crushed tomatoes, 1 Tbsp. unsalted butter, and 1 tsp. crushed red pepper flakes. Cover and cook, stirring occasionally, until beans are tender enough to cut with a spoon and beads of oil appear on surface of sauce, 25–35 minutes.
Step 3
Meanwhile, cook 12 oz. medium tube-shaped pasta (such as rigatoni or penne) in a large pot of boiling salted water, stirring occasionally, until very al dente, about 2 minutes less than package directions (pasta will finish cooking in sauce). Drain, reserving about 1 cup pasta cooking liquid.
Step 4
Add pasta to sauce along with zest of 1 large lemon, 2 oz. Parmesan, finely grated (about 1 cup), and remaining 1 Tbsp. unsalted butter. Increase heat to medium-high and cook, stirring vigorously and adding up to ½ cup reserved pasta cooking liquid as needed, until sauce is silky and pasta is coated and al dente, about 4 minutes. Remove from heat and stir in 1 Tbsp. fresh lemon juice. Taste and season with more salt if needed.
Step 5
Transfer pasta to large bowl or platter and drizzle generously with oil. Top with coarsely chopped mint and/or parsley and more Parmesan. Serve with lemon wedges for squeezing over.