If there was no cause you could remember,
you may need to see a doctor.
If it's result of something you did and it gets better every day, you can do gentle shoulder /neck massage, some yoga poses, shoulder strech and rotation, and heat pad may also help too.