Hello UG!

So I'm practising the first solo to "Lazy" by Deep Purple, and I recently noticed that I tense up the shoulder of my fretting hand. If I relax it, I can feel a relief; however, the tensing of my shoulder doesn't actually hurt and I don't think it affects my playing much.

But my question is, should I stop this and try to relax my shoulder while practising?
Yes. Being tense in any part of your body is just going to slow you down and make you tired. You should definitely try to stay as relaxed as possible.
Yes, you may think that it is not affecting your playing but is does. It's great that you can identify tension when you are playing this is very critical that means that you are aware of what your body is doing while you are playing. The moment you feel any bit of excess tension creeping up in any part of your body, release it immediately. This will help you play more fluid.