Pain during sex

A couple of times I’ve had sex and I get a shooting sharp pain just below my ribs (left) and I have to stop! So annoying because I’m just about there and then suddenly shooting pain...

Normally it’s when I’m sitting up on top and riding him... the pain then lasts for the rest of the day - hitting in waves - and is generally just really uncomfortable. Then it just disappears! Any ideas what this is or similar thing happened??