How to lock the cursor while looking around ingame?

Hello,
i cant figure this out but i want to lock my cursor in same spot while pressing “Right Mouse Button” and looking around with the camera. When i press RMB and then move my mouse to look around the cursor is still moving around.

Can someone help this with me or give tips what i need to “get” etc?