If your onions start to burn, simply reduce the heat and stir them more frequently. You can also add a splash of water to help prevent them from burning.