How to make a object move when looking around

Hey, I want to make a flashlight move up and down with a character. And been trying a lot of things, but can seem to find to fix it. Here is a video:
https://streamable.com/pje94

If someone knows how to fix it please tell me and thx.