In a stovetop or electric pressure cooker, heat the oil (use the Sauté function in the Instant Pot). Add the onion, garlic, carrots, and celery, and cook for a minute or two, stirring constantly so the garlic doesn't burn.
Add the cumin, paprika and salt. Stir to combine.
Add the potatoes, lentils and stock or broth.
Secure the lid on the pressure cooker. Cook at 3 minutes on high pressure. Quick release the pressure, unlock the lid, and stir in the kale or spinach, if using.
Season to taste with salt and pepper (very important!) and serve. The soup will thicken a bit as it cools.
