Turn the instant pot to sauté and add 2 tablespoon oil to the inner steel insert. When it is hot, add the onion masala, the powdered spices (chilli, coriander, turmeric and garam masala), and salt. Add a few tablespoons water, mix well and cover with a lid. Simmer this masala for 8-10 minutes. Stir once or twice to make sure the masala is not sticking to the bottom. Once it's done, the masala should be thick and shiny.
Add the soaked lentils along with all the water and close the lid. Make sure the pressure release handle is on 'sealing', press the pressure cooking button on high and set the timer to 15 minutes. Once the timer beeps, release the pressure after 10 minutes.
Open the pot and switch the instant pot to sauté (normal). Mix the dal well with a spoon, add the spinach and cook for 1-2 minutes only.
Temper the dal: Heat 2 tablespoon cooking oil or ghee in a small frypan, add the sliced onions and fry until golden brown. Add the cumin and green chillies and pour carefully over the hot dal. Serve with plain, steamed rice or cumin rice.