I'm late to this thread but here is my two cents.
Spend some time at the range with a bench and a bull bag. You'll find out in a few shots if it's your gun.
If the gun is OK, you need to focus on the basics, sight alignment and trigger pull.
If you still struggle, go to the eye doc, you may need glasses.