There are several reasons that your onions may not have properly caramelized. The first is that they were sliced too thin. You want them to be at least 1/8" thick. Shaved onions can burn quickly. Secondly, if you skip the avocado oil, which raises the smoking point of butter, this can cause the onions to burn. Lastly, having the heat too high to try to speed up the process can cause them not to caramelize.