Health question.. rotator cuff?
I had similar issues for years, all through my 20s. I had a few pulls and dumb things I did as a kid and late teens that probably caused it.
I rarley have pain these days, which is a godsend.
I started doing shoulder stretches, frequently. Use a long rod. A broom, a pool cue, doesn't matter. Longer is easier. Hold onto it in front of you, hands wide on it. Then hoist it up over your head and maintaining your grip, you want to swing it behind you and touch your back (if you can). It sounds weird, but try it and it'll make sense.
At first it hurts like hell, but don't power through. Try to work close to where it hurts, but keep any pain dull and not stabbing. Stabbing is usually more damaging. Start slow, 1-2 times a day, 2-3 times a week, then do more. Move your hands closer as you're able. Do more reps as you're able. Stop when the muscles get sore or tired, but usually 2-3 sets of 10-15 is enough to work out kinks.
The risk with shoulder injuries is to favor it too much until it freezes, which is a bad place to be. But over work will cause the muscles to swell and not move the way they should. Basically like carpal tunnel, but in your shoulder. Anti inflammatory meds help, but your liver will thank you to use them sparingly. I was taking ~1600mg a day of ibuprofen When I first started the stretching, tapered down as the pain reduced over time.
Before I started doing the stretches, I couldn't reach behind a passenger bucket seat, and had trouble with putting on and taking off shirts and jackets. Now, I haven't thought about that pain in probably 2 years..
It also helped to work on how I placed my arms when I slept. Arms over head is a no no. Sleeping right on the shoulder was another big aggrevator. I found that sleeping on the opposite side and keeping my "bad" arm draped over a pillow to keep the shoulder neutral helped a lot.
Once the pain was gone (took probably 18 months total), I haven't needed to favor it or worry much about it. As the pain lessened I started to try and strengthen the shoulder muscles with overhead barbell presses and lateral raises. Not sure how much they helped, but they didn't seem to hurt.