A lot of them are coenzymes for cellular metabolic functions. They play a role in your cells producing energy and the doses may increase it. Whether they actually increase metabolism (and thus energy) in the quantities and scenario of an energy drink, I don’t know. I’m sure you could find studies on it.
This is mostly related to b vitamins, i don’t think most energy drinks have anything else in them. Some preworkouts might have vitamin c which may improve exercise performance.