Lane movement (move in increments) using Character Controller

I’m looking to implement lane movement using the character controller and having a little trouble doing so.

I’ve managed to create a lane movement using Vector3.MoveTowards and works well. If i press the left or right button, the player moves a certain amount in that direction. Only issue with this is that there is no collision detection with the character controller.

I know why this is, as collision detection occurs when the character controller is moving, and thats only done with CharacterController.Move, which i’m not using to move left or right.

If i remove Vector3.MoveTowards movement and use CharacterController.Move for left and right movement, then the collison works fine. However, the movement changes from lane movement to moving side to side freely.

Here is my code for movement:

using UnityEngine;
using UnityEngine.InputSystem;

public class Movement : MonoBehaviour
{
    private CharacterController playerController;

    private PlayerInput playerInput;
    private InputAction move_Action;

    private float forwardSpeed = 2f;
    private float moveSpeed = 3f;

    public float xMovement;

    void Start()
    {
        playerInput = GetComponent<PlayerInput>();
        playerController = gameObject.GetComponent<CharacterController>();

        move_Action = playerInput.actions["Move"];
    }

    void Update()
    {
        Vector2 input = move_Action.ReadValue<Vector2>();

        //Vector3 move = new Vector3(input.x, 0, forwardSpeed);
        Vector3 move = new Vector3(0, 0, forwardSpeed);
        playerController.Move(move * Time.deltaTime * moveSpeed);

        if (Keyboard.current.aKey.wasPressedThisFrame)
        {
            xMovement = xMovement - 4.5f;
        }
        else if (Keyboard.current.dKey.wasPressedThisFrame)
        {
            xMovement = xMovement + 4.5f;
        }

        transform.position = Vector3.MoveTowards(transform.position, new Vector3(xMovement, 0f, transform.position.z), 0.2f);
    }
}

Can any help my either translate my current lane movement to CharacterController.Move or provide another way to create lane movement using the character controller?

I should also add that in my code, there is an uncommented line for Vector3 move, which has input.x value instead of 0. I did try and use this line along with Vector3.MoveTowards and there was collision detection, but it wasn’t very consistant as it doesn’t work all the time.

I quite new to this so i hope i’ve made sense in my explanation and what i’m looking for.

Appreciate any help.