There is nothing in coconut macaroons that would cause these symptoms. Sugar does not cause an increase in heart rate
. If these symptoms are getting more frequent then you may consider visiting your doctor who may wish to do a few simple investigations.
At your age, there is unlikely to be anything serious to worry about.