Hi and welcome to the forum! I am glad that I can help you.
You want to know the cause of the symptoms that you experience.
Pain in the sternal area may indicate several medical conditions such as heart issues (if the pain is experienced as pressure and appears when exerting oneself), gastritis (the pain is described as burning located in the lower part of the sternum or under the sternum in the upper part of the abdomen; the pain appears before eating or sleeping, when eating acidic food or consuming alcohol, etc), muscle pain (this pain may be located in the entire muscle but mostly on the spots where the muscle is connected with the bone; this pain appears after body work outs or lifting heavy objects), chondritis (inflammation of the rib cartilages may cause pain in the sternal area, edema, redness of the skin), etc.
According to the data that you described, you may or may not experience any of the medical conditions listed above. You may consider having an RTG scan of your chest to rule out a possible fracture of the sternum. Avoid lifting heavy objects or having short rests when doing it in the times when you experience the pain. You may also consider taking NSAIDs such as ketoprofen or diclofenac, to ease the pain and possible inflammation (note that these medications may cause irritation of the gastric lining and heartburn).
Please keep in mind that I provide medical information only. I am not able to diagnose medical conditions online. Please contact your doctor for further advice and information about diagnosis and treatment options.