How do I slowly Rotate an Object so it's transform.up is aligned with the hit.normal of the Ground below ist

I’m trying to make an Object slowly rotate so its transform.up is the same as the hit.normal of the ground below it. So far i’ve only been able to rotate it immediately by using this:

if (Physics.Raycast(_tr.position, _tr.TransformDirection(-_tr.up), out RaycastHit hit, Mathf.Infinity, groundLayer))
{
     transform.up = hit.normal
 }

I would like the object to slowly rotate and not just snap.

you’re going to need to use a Quaternion.Slerp.

transform.rotation = Quaternion.Slerp(startTransitionRotation, endTransformRation, Time.fixedDeltaTime * turnSpeedFactor);