What am I doing wrong? New cook here. Thanks!!
This depends on the result you are looking for. I'm not sure if you want onions that are crispy or caramelized. You describe wanting them to be crispy, but it looks like the attempt pictured was aiming for caramelized.
For onion crisps, you need to deep fry in plenty of oil, as the comments suggest. You should take care that your onion slices of pieces are the same size. Deep fry until golden, then remove from oil and drain well. You should be able to crisp onions in a few minutes.
However, deeply and evenly caramelized onions take quite a while...40 to 45 minutes. The heat needs to be medium or lower. Also, slice evenly. Pieces of different size will cook differently. You do not need an excess amount of fat, in this case. 2 - 3 tablespoons of butter is fine for 3 - 4 large onions. Melt the butter, add onions and stir to coat. Then leave them alone for about 5 minutes. Stir and scrape up the fond. Repeat this every 5 minutes or so, reducing the heat if they are cooking too fast. They will not become fully caramelized and jammy until the 30 to 40 minute mark. You should also deglaze the pan at the end, to release the remaining fond. You can add 1/4 cup water, balsamic vinegar, wine, broth...really anything here.
If you just want an evenly browned, pan-fried onion. Begin the caramelization process described above, and stop when the onions are browned to your liking. In general, from the picture you post, I would say your heat is too high.
You've cut your onions too large for them to crisp up.
Onions hold so much moisture that if you leave them in large pieces, the middle can only get up to steaming temperatures, while the outside edges cook more quickly and burn.
As I mentioned in my answer to another question about frying onions, for instructions on making crispy onions, I recommend looking up recipes for making "Bawang Goreng", Indonesean fried shallots.
I would also recommend cutting them across the pole of the onion so that you get rings (or half rings if you cut it in half first) rather than "frenching" the onion. If you have a mandoline, you should use it as it will ensure consistently thick slices of onion so that it all cooks in a similar amount of time. (And if you're planning on making this regularly, a mandoline is a good investment against frustration and wasted onions)
Two things I note about your picture based you your stated outcome of crispy onions:
- The pieces are rather big. Onions have a very high moisture content, which means that the larger the pieces are the slower you have to cook them to get a uniform result (this is part of why caramelizing onions takes so long and needs to be done on low heat). Try with shorter and/or narrower pieces and you should get better results.
- They do not appear to have much residual oil. You ideally want a lot of oil for an even crispy result, ideally enough to completely cover the onions. Better yet, deep fry them instead of just regular frying or sauteing. Having the onions completely surrounded by oil (or whatever other fat you are using), you are able to heat them from all sides at the same time, which helps them cook more evenly.
Additionally, just like with most other things, whenever cooking onions in almost anything other than a soup or stew, you will find you end up with much better results the more uniformly sized you can make the pieces. Ideally you want each piece to be relatively uniform in thickness, width, and length, which for an onion usually translates to cutting it into rings, discarding the top and bottom, and then cutting the rings into pieces the size you want (and yes, it is a lot of work, but it makes it so much easier to get it to cook the way you want it to).
As an aside, if you would be OK with just the outsides being crispy, you can make this all much easier by breading the pieces of onion in a light layer of white flour prior to cooking. If done right, they end up with a nicely browned crispy or semi-crispy outside and a partially caramelized inside, perfect for stuff like garnishing hamburgers or hot-dogs, adding some interesting variety to a salad, or topping off a bowl of kushari.
To answer from a "why did they do this" point of view, as the other answers have more practical cooking advice: it is because onions basically go through a few phases in cooking in the frying pan.
(Raw) -remove water-> (Translucent) -cook sugar-> (Caramelized) -cook more-> (Burnt)
What happens with long onion pieces cooked over too high of heat and not moved sufficiently is that the ends lose their water first, prior to the rest of the onion, since they are on the end (just like the end piece of bread in a loaf becomes dry sooner than the middle). Thus they progress to caramelized, and then soon to burnt.
Any of those elements can help ameliorate this:
- Cut them smaller: there is less "middle" and nearly all, or all, "end", and the water can get out faster from the middle
- Lower the heat: the gradient between the middle and the ends is less, so water has more time to move outside from inside
- Stir them frequently: both moves the water and gets the ends away from the heat, similar to lowering the heat. Also, avoids the ends touching the pan and not the middle, which can happen sometimes, making this worse.
Some other options:
- Increase the amount of oil - this heats the onion more evenly, as the hot oil can coat the onion better, and less cooking is from direct pan contact
- Increase the amount of salt - salt helps remove water from the onion, which helps make the cooking more even and caramelization happen faster
- Start low, then go higher later - if you truly want a crispy texture and don't want to bread or deep fry, cook them most of the way on low heat, until most of the water is driven out. Then once that's happened, you can raise the heat for a short time to finish the onion. This is still pretty risky, as it's likely to burn some parts, but with practice is possible.