Add onion and sauté 2-3 minutes until onion starts to turn translucent.
Add garlic and stir a minute longer until garlic is aromatic but not brown.
Add spinach, salt, and pepper and stir to coat spinach in oil. Continue stirring every 30 seconds until spinach is wilted (about 4-5 mins). Do not continue cooking once spinach is done wilting. Immediately remove from heat.
Add lemon juice and red pepper flakes (if desired) and stir. Adjust salt level if needed. Transfer to a serving dish with a slotted spoon to drain out the juices.
Notes
Use a slotted spoon to move the spinach onto a serving plate or bowl since it releases a lot of excess water when cooking.
If using mature spinach, chop any big spinach leaves that are larger than hand sized once or twice to make it easier to eat and remove stems.
Always wash your spinach! Ideally use a salad spinner and cold water. This way you can rinse using the bowl part, then the colander portion and then spin it all dry. You can also rinse in a colander and pat dry with kitchen towels. Even pre-washed baby spinach should be rinsed but you won’t need to be as thorough with it.
You can use this cooked spinach in any recipe that calls for frozen, just leave out the lemon and crushed red pepper.
Store leftovers in an airtight container in the refrigerator for up to 3 days and microwave before eating.