If you think it is medical then you should probably go get it checked out. If you don't want to go seek advice right away then try adjusting your playstyle (keybinds, keyboard placement, hand placement, etc.)
Also make sure to properly stretch and warm up before playing osu!, I know it can seem corny and possibly embarrassing to have to stretch before playing a game but I think it is essential for rhythm games that can take upwards to 70kps.
If it is a dull pain then it is most likely muscle and finger strain (which is quite normal, it could just mean you need to build up the stamina). If it is sharp and abrupt then you should probably stop playing for a little while to let the body heal the damage that was already done.
If it is neither then it should be up to you on whether you want to continue to play or not.