It seems more like a condition called costochondritis
this is an inflammation at the junction of the ribs and the cartilage
it may not have a direct cause.
generally it gets improved by anti inflammatory drugs of local application of NSAIDs and heat application.
It is less likely to be due to hiatus hernia