If it’s so severe it’s beating extremely rapidly and feels like a panic attack.. you have something medical going on and you need to seek out help.
But it’s also normal for metabolism to ramp up after eating foods like sugar. Sugar can make you hyperactive and giddy etc. Some Heart rate increase from eating is normal.
But if it seems extreme, again seek help. You may have some sort of metabolic issue.