While I can’t say with certainty how the game you cited does this, a common theme is to use a spring, maybe a combination of spring and hinge, or a spring to an empty GameObject to which the camera is attached (to provide additional control at the GameObject, like limited orbiting). The camera is basically attached to the player or character through such a joint.