Heat the olive oil in a large skillet over medium-high heat. Add the diced onion and cook until softened, about 3 to 4 minutes.
Stir in the minced garlic and red pepper flakes. Cook for about 30 seconds until fragrant.
Add the sliced okra to the skillet in an even layer. Let it cook undisturbed for several minutes to help reduce moisture and develop some browning.
Stir the okra and continue cooking until tender and lightly golden around the edges. Season with salt and pepper, then drizzle with lemon juice or vinegar before serving.