The reasons may be different, most likely it is intercostal neuralgia. Mydoc specialists can provide a detailed consultation on your problem in full.
Intercostal neuralgia, or stomach problems as an option.
I had this and that, in both cases I had chest pains. Check your stomach or see a neurologist)