Have a look at the university lesson style video to find out how the Energy equation can be derived:
Energy Stored in Capacitor
4 min
Note: there is unfortunately lack of a global standardization for designated electrical quantity letters. For example: in the article energy symbol used is W, in video it is U and in Europe often used energy symbol is E. Nevertheless, I hope we can go over this confusion and it is not blocking point to understanding the core.