Heat oil in a large nonstick skillet over medium-high heat. Add onions and cook, stirring occasionally, until softened, about 3 minutes. If using fresh spinach, add it in batches and toss with tongs until wilted. Drain in a colander, pressing out excess moisture with the back of a spoon. Let cool. If using thawed frozen, add it to the onions and toss to mix well. Set aside.