Your description of the pain is very consistent with a condition called pleurisy. Pleurisy is inflammation of the lining of the lungs/chest wall. The pain can be very intense and stabbing. It is often worsened by deep breathing.
Another possibility is a condition called Precordial Catch Syndrome, which probably is a variant of pleurisy.
Both are treated with ibuprofen, although I see that you had an endoscopy indicating that you have some some problem with your stomach. Ibuprofen can worsen stomach irritation so use caution.
If the pain isn't getting any better I would recommend you be evaluated to get a proper treatment plan.
Advice and opinions given are based on the information provided and must not be considered an official medical recommendation. The limitations of the internet prevent an appropriate evaluation. Always consult your doctor if there is concern.