If your tendency is to bob up and down, raise your head or lift your arms and shoulders as you swing back, you will end up changing your spine angle in your backswing. This will cause you to hit thin shots or even top the ball.
Ideally, you want to keep your head at the same level throughout your swing to get back at the ball with consistency. You need to learn to turn your shoulders around steady spine.
You need to learn to move your shoulders independently from your body. Often times, lack of flexibility in your shoulders won’t allow you to swing your arms freely. Doing Pilates exercises will help you increase mobility in your shoulder.