Place the oil in a large skillet and heat over medium heat. Add the onion and cook, stirring frequently, until the onion is soft and tender and has begun to color lightly, 10 to 15 minutes. Add the garlic and cook, stirring constantly, until fragrant, 1 to 2 minutes.