Prepare the chayote: Wash the chayote squashes. Using a sharp vegetable peeler, carefully peel away the tough outer skin. Be aware that chayote can be a bit slippery. Cut each squash in half lengthwise, then remove the large, flat seed in the center. Slice the chayote halves into 1/4-inch thick half-moons.
Sauté the aromatics: Heat the olive oil in a large sauté pan or skillet over medium heat. Add the thinly sliced yellow onion and cook, stirring occasionally, until softened and translucent, about 5-7 minutes.
Add chayote and seasonings: Add the sliced chayote to the pan with the onions. Stir to coat with the oil. Sprinkle with salt, black pepper, and optional red pepper flakes. Cook for 8-10 minutes, stirring occasionally, until the chayote is tender-crisp. You want it cooked through but still with a slight bite.
Finish and serve: Taste and adjust seasoning if needed. Remove from heat. If using, stir in fresh chopped parsley or cilantro just before serving. Serve hot as a delicious side dish.