Getting player move around its local axis (Read the description please)

Hi, I checked before posting the question, I found a lot of questions with answers like “use transform.Translate” but Im not sure I understand how to use it in my case. I have a Joystick asset added to game, the movement was working just as I needed while I was using transform.position, but because its not calculating collisions my character kept passing through some walls(corners to be precise) in the house and I decided to change to rigidbody.velocity - movement.
The problem is it moves around world axis and I honestly dont know what to do atm… tried a couple of different things but those doesnt work or work not the way they supposed to… This might be very primitive question, please take a look at code

void FixedUpdate()
{
            var x = joystickFloat.Horizontal * Time.deltaTime * turnSpeed;
            transform.Rotate(0, x, 0);
            // GetComponent<AudioSource>().UnPause(); //meow
            if (!cantWalk)
            {

                Debug.Log("moving");
                var w = joystick.Vertical * Time.deltaTime * moveSpeed;
                var y = joystick.Horizontal * Time.deltaTime * moveSpeed;
             
                Vector3 movement = new Vector3(joystick.Horizontal. * Time.deltaTime * moveSpeed, 0, joystick.Vertical * Time.deltaTime * moveSpeed);
                rbPlayer.velocity = movement;
             }
}

Trying to translate Vector3 movement to local axis… got stuck, explain please

Did you try performing the rotate in local space?

Note the overload where you can specify [Space](https://docs.unity3d.com/ScriptReference/Space.html) relativeTo when calling Rotate.

Interesting idea, I tried but it didnt help, after rotating screen it keeps moving the way it did before rotating, like when I press up insead of going forward it moves right or left (depends on which way I turned)

Tried something like Vector3 moventForward = transform.forward * moveSpeed;
but of course this only moves forward or backward, dont understand how to apply transform.forward and transform.right at the same time