Start with cutting off the roots and the sprouts area
Peel the onions and cut them in half over the line that connects root area and sprout area.
Then take each half and cut with your sharp knife until but not through the root area. And repeat so you get some 10 or so adjacent cuts, following the round shape of the onion. The pieces will then be held together by the root area.
Then cut the onions halves perpendicular to these cuts, so that you obtain equal sized pieces. repeat for the other onions
In a thick bottomed skillet, heat the oil and add all the onions pieces
Then heat on high and stir. In the first 10 or so minutes you will see the volume shrink considerably, due to evaporating water. Therafter put the heat a bit lower and regularly scrape the bottom with your spatula.
Towards the end of the process, you will see that the onions become browner, you need to scrape more often, and you can reduce the heat further.
Take your time there, you do not like to have black onions, but brown, caramelized ones
You can store them in the fridge for several days or freeze them for several months