Cutting
If your eyes don't tear up when you're chopping onions, you're probably not getting the most out of their flavor. You should cut onions diagonally, rather than along (or perpendicular to) their axis of symmetry.
Sauteeing
Onions should be the first ingredient you sautee because they cook for longer than almost any other vegetable.
For curries, stews, and braises, onions come into their best form after they've been sauteed under medium-low heat for about 30 minutes, routinely tossing. By the end they should be deep gold (if white or yellow onions), with slight singing along their edges.
What's happening is that the heat is slowly breaking down the onions into simpler carbohydrates. This is why onions caramelize under sustained heat, and why sauteed onions have a sweeter taste. Well-sauteed onions are sweet enough to counterbalance any potential excess spiciness.
How well your sautee your onions sets the upper bound for how good your curry will be. If you leave them for long enough, your curry will have an extraordinary foundation. It will bring you back to balance if you don't quite nail your spice and seasoning balance. Its flavor will percolate to every downstream ingredient. If you rush it, you lose a key source of flavor and balance. You'll be inclined to overcompensate for your curry's lack of flavor in the late game by adding additional spice or salt. You'll jump straight from bland to abrasive and inedible.
Sauteeing Methods
There are a two ways to sautee onions for curry foundations.
The first method is to sautee onions with just oil. It's the most versatile, applicable to any curry or stew. You should get good at this first. It's straightforward - a tablespoon of oil per onion, maybe a few dashes of salt, over low medium heat, with the lid on, for 30-35 minutes. You can make this a little faster by increasing the heat somewhat, but it will taste like a shortcut.
The second method is to infuse spices with the onions while they sautee, forming a sort of chutney-like paste. This is trickier because you now have 2 cooking timelines to get right. Many spices are more heat sensitive than onions. You have to be conscious of this when you add your spices to the onion mix.
Salt and black pepper are basically heat indifferent to heat. Cumin as well - in fact cumin's flavor wakes up a bit under heat. I can't really taste coriander, but it usually gets thrown in early in onion sautees. Paprika's smoky flavor is fairly heat resilient as well. For spices that can stay in heat without losing their flavor, you can add them in early in the sautee process without issue.
Tumeric on the other hand is heat sensitive. Cardamom I believe is also in this category. They both burn quickly under average intensity heat, and its flavor dissipates quickly after a surprisingly short time on the stove. You have to consider this whenever you add a spice mix to an onion sautee - especially curry powder and garam masala, both of which rely on tumeric to carry much of their pungency. If you're adding spice mixes, or straight tumeric, to your sautee, you should do it towards the end, ideally the last 5 minutes. This give them enough time to become aromatic but not enough time to burn of for their flavor to cook out.
Besides spice infusions, you can also eliminate the texture of the onions entirely from a foundation. This can be essential when you're aiming for a silky gravy that still has all the taste of its constituent ingredients. To do this, simply dissolve a teaspoon of baking soda to half a cup of water and add it to the sautee. The baking soda will dissolve the fibers of the onion cells, reducing the sautee down to a practically soluble mush.
Sauteeing Moisture
Another thing to consider is your onions' moisture level while you sautee. This is why you keep the lid on. At the right level of heat, the onions are mostly steaming in their own nectar. This helps avoid the onions burning, because the parts that are exposed to steam will never get hot enough to burn. When infusing with spices, this also helps bind the spices to the onion, and for the spice flavor to seep into the onion slices.
Depending on everything from the airtightness of your lid, to the the humidity, to even the altitude (and consequent air pressure), your onions may very likely dry out. This is part of why frequently (~every 5 minutes) stirring during your sautee helps - it forces you to check in with the onions to make sure they haven't dried out. As soon as they dry, they are under much more direct heat exposure, which speeds up their time to burn. If you seeing your onions are starting to dry out, add a small amount of water. Maybe a quarter cup per onion.