Rinse the basmati rice under cold water until the water runs clear. This helps to remove excess starch. Drain and set aside.
In a large pot, bring 4 cups of water to a boil. Add the rinsed rice, a pinch of salt, and reduce the heat to low. Cook covered for about 15 minutes or until the rice is fluffy and all the water is absorbed. Remove from heat and let it sit covered for another 5 minutes.
While the rice is cooking, heat 2 tablespoons of vegetable oil or ghee in a large skillet over medium heat. Add the cumin seeds and sauté for about 30 seconds until aromatic.
Add the chopped onions to the skillet and cook until they become translucent, about 5 minutes. Stir in the garlic and ginger, cooking for an additional 1-2 minutes.
Add the chopped spinach to the skillet and sauté until wilted, about 3-4 minutes. Stir in the turmeric powder, garam masala, and salt to taste.
Fluff the cooked rice with a fork and gently fold it into the spinach mixture in the skillet. Mix until the rice is well coated with the spices and spinach.
Serve hot with lemon wedges on the side if desired.