The restoring torque for a magnet oscillating in the vibration magnetometer is provided by
Torsion in the suspension thread
Gravity
Horizontal component of the earth’s magnetic field
By all these
τ=mBH2lsinθτ
=m.2lBHsinθ
⇒τ=μBHsinθ