Coffein simply blocks the receptors in your body that send the signals to your brain that you are tired, while sugar is essentially pure energy. I’m no expert on this subject, but afaik both coffein and sugar increases blood pressure, which is probably not an ideal thing.
but it’s le deep