(Solved) Aligning player to surface while still maintaining look direction

Let’s assume I have a sphere that can hover, so it has an offset from the ground. What I want is to simply rotate the sphere to match the normals of whatever is under it on the X and Z-axis, but still be able to rotate it to the direction in which it is travelling on the Y-axis. I have tried a few things that I found here on the forum and [2] seemed promising but unfortunately, it did not work.

RaycastHit hit;
if (Physics.Raycast(body.position, Vector3.down, out hit, 10, layerMask))
{ }   

Quaternion groundTilt = Quaternion.FromToRotation(Vector3.up, hit.normal);
body.rotation = Quaternion.Euler(0, currentMovementDirection.y, 0);
body.rotation = groundTilt * body.rotation;

Here is a diagram of what I want, seen from top and side views.

references:
[1] Rotating a player to match terrain slope - Questions & Answers - Unity Discussions
[2] https://forum.unity.com/threads/rotating-an-object-along-the-terrains-normal-whilst-looking-at-a-position.93570/

You can use vector projection to find the relative forward vector between the ground’s normal and your movement vector;

if (Physics.Raycast (body.position, Vector3.down, out RaycastHit hit, 10f, layerMask))
{
    //Up is just the normal
    Vector3 up = hit.normal;
    //Make sure the velocity is normalized
    Vector3 vel = currentMovementDirection.normalized;
    //Project the two vectors using the dot product
    Vector3 forward = vel - up * Vector3.Dot (vel, up);

    //Set the rotation with relative forward and up axes
    body.rotation = Quaternion.LookRotation (forward.normalized, up);
}