Possible reasons for back stiffness could be RSI ( Repitative strain injury ) .
Now understanding if your back musculature is stiff and to what grade would require proper evaluation and also your posture and ergonomics .
These would help in identifying the root cause and will assist you get rid of back stiffness .
Again it's just stiffness or Pain / discomfort ?
Usage of massage gun is not really advisable before proper assesment of underlying condition .
Health Tips
Avoid jerky spinal movement.
Avoid lifting heavy weights .
Forward bending to be avoided to certain extent .
Sleep on your back on firm surface with hard pillows under knee to bend your knees to 45 degrees ( clinically proven )