I had open heart surgery now having sharp pains in the chest what could be the problem?

Incision. Usually sharp pain after a sternotomy is incisional. You might have pulled something if you were overexerting yourself. If pain meds don't make it improve then make appointment to see your surgeon.
Surgery . Could be just the eternal wires but should check with your doctor to be sure nothing else.