Heating the onions especially on high heat usually make the onions taste bitter. To prevent this, make sure to sauté using low or medium heat only.