Heat oil in a medium
Dutch oven or other heavy pot over medium-high. Add a few
mustard seeds to the pot. When seeds start to wiggle and pop, reduce heat to medium and add curry leaves (if using), asafetida (if using), and remaining
mustard seeds. Cover pot and cook spices, swirling, until
mustard seeds start popping more gradually, about 30 seconds. Uncover pot and return heat to medium-high. Add
ginger-and-
garlic paste and cook, stirring constantly, until beginning to brown, about 1 minute. Add red onions and a big pinch of salt and cook, stirring often and reducing heat if needed to prevent burning, until onions are golden brown and jammy, 10–12 minutes.