How to change unity CharacterController center in script

Solution 1:

using UnityEngine;

public class Example : MonoBehaviour
{
    CharacterController controller;
    private void Start()
    {
        controller = GetComponent<CharacterController>();
        controller.center = new Vector3(0, 1, 0);
    }
}

Read the scripting wiki from Unity. https://docs.unity3d.com/ScriptReference/