Heat the olive oil in a large skillet over medium heat.
Add the chopped onion and cook for about 2-3 minutes until softened.
Add the minced garlic and cook for an additional 1 minute until fragrant.
Stir in the chopped spinach, ground cumin, salt, and pepper. Cook for about 3-4 minutes until the spinach is wilted.
Remove the mixture from heat and let it cool slightly.
Lay one tortilla in the skillet. Sprinkle half of the shredded cheese on one half of the tortilla.
Spoon about 1/4 of the spinach mixture over the cheese. Top with another 1/4 cup of cheese.
Fold the other half of the tortilla over to cover the filling.
Cook for about 2-3 minutes on one side, until the cheese starts to melt and the tortilla is golden brown.
Carefully flip with a spatula and cook for an additional 2-3 minutes on the other side.
Remove from the skillet and repeat the process with the remaining tortillas and filling.
Cut the quesadillas into wedges and serve warm with sour cream or salsa, if desired.