A humble line-up: 1 small onion, 2 chillies, 1 tsp of hot chilli powder (or mild, or curry powder, or paprika, as you wish), 1 tin / box of tomatoes, and a bit of salt and pepper. You could add garlic too, if you wanted.
Slice the onion (the hairy end is there for grip).
Chop up the chilli - this one's getting a bit dry, but that's fine. It'll have plenty of cooking time to spread its flavour. I leave the seeds in because a) why bother, and b) they make it hot.
Melt butter or ghee or oil in a smallish pot - about 2-3 Tablespoons.
Fry the onions and the sliced chilli together on a medium heat. They want about ten minutes to soften and get interesting (ie caramelise a bit).
You can entertain yourself while they're frying by grinding in the pepper.
When they're getting caramelised, they start to look more golden, like this. That's when you should add the chilli powder / curry powder / paprika.
But if you forget and add the tomatoes first, that's fine, just add it after. We're not that fussed.
Put the lid on, turn the heat right down, and leave it to simmer - ideally for an hour, but do check it from time to time to see how it's doing. You want it to be thick enough that you can dollop it on stuff rather than pouring it on. When it's done, salt to taste (I'd use about half a teaspoon) and...
Serve it on its desired receptacle. Here, a nice thick slice of mushroom and lentil bake.