Bring a large pot of salted water to a rolling boil.
Add frozen edamame and cook for 4–5 minutes until bright green and tender.
Drain immediately and let steam-dry in a colander for 1 minute.
Melt butter or heat olive oil in a skillet over medium-low heat.
Add garlic and cook for 30–45 seconds until fragrant, not browned.
Stir in red pepper flakes if using.
Add edamame to the skillet and toss to coat evenly.
Season with sea salt and black pepper.
Toss over low heat for 1–2 minutes until glossy and heated through.
Taste and adjust seasoning if needed.