Hi,
Well there are a couple of things to try. But by far the main one is help the snake feel more secure and less threatened.
This can include tips such as not reaching down from above to pick the snake up but letting it see you coming and trying to come from the side instead. And pay attention to how you reach for it - quick movements or slow, jerky tentative ones can actually provoke the snake into thinking it is about to be attacked.
You can change the tank setup to give it more/ better hiding spots and cover the back and sides - but we would really need more details of your setup to see what could be done with that.
Letting the snake settle in when you first get it is probably the step most people forget. I like to let it eat three meals in a row before trying to really handle it much but most people just wait a week.
When you do handle it try and avoid doing anything that makes it a frightening experience for the snake. So no sudden movements and keep the handling session short at first - say 5 or ten minutes then put it back in its tank.
Don't handle every day at first and never for the two days after feeding at all.
They usually do settle down quite quickly but you do also just get some that don't like handling. My largest female still poops herself (figuratively) whenever I open the tub and will try to run for the first minute or so until she realises nothing bad is happening. Every time it's the same performance.
The others quite frankly ignore me when I reach in and pet them but seem to tolerate being lifted with the same indifferance.
dr del