optimize the code for android

I need to optimize the code for android. make it so that when you press the ui buttons, the object moves, please help here is the code itself:

using System;

using System.Collections.Generic;
using UnityEngine;

public enum Axel
{
Front,
Rear
}

[Serializable]
public struct Wheel
{
public GameObject model;
public WheelCollider collider;
public Axel axel;
}

public class CarController : MonoBehaviour
{

[SerializeField]
private float maxAcceleration = 3.0f;
[SerializeField]
private float turnSensitivity = 10.0f;
[SerializeField]
private float maxSteerAngle = 45.0f;
[SerializeField]
private Vector3 _centerOfMass;
[SerializeField]
private List wheels;

private float inputX, inputY;

private Rigidbody _rb;

private void Start()
{
_rb = GetComponent();
_rb.centerOfMass = _centerOfMass;
}

private void Update()
{
AnimateWheels();
GetInputs();

}

private void LateUpdate()
{
Move();
Turn();

}

private void GetInputs()
{
inputX = Input.GetAxis(“Horizontal”);
inputY = Input.GetAxis(“Vertical”);
}

private void Move()
{
foreach (var wheel in wheels)
{
wheel.collider.motorTorque = inputY * maxAcceleration * 500 * Time.deltaTime;
}

}

private void Turn()
{
foreach (var wheel in wheels)
{
if (wheel.axel == Axel.Front)
{
var _steerAngle = inputX * turnSensitivity * maxSteerAngle;
wheel.collider.steerAngle = Mathf.Lerp(wheel.collider.steerAngle,_steerAngle,0.5f);
}
}
}

private void AnimateWheels()
{
foreach (var wheel in wheels)
{
Quaternion _rot;
Vector3 _pos;
wheel.collider.GetWorldPose(out _pos, out _rot);
wheel.model.transform.position = _pos;
wheel.model.transform.rotation = _rot;
}
}
}

Maybe something like this? Mobile Joystick in Unity - How to create your own touch screen virtual joystick. But instead of translating the character, use the offset vector .x and .y for steering left and right.

Please use code tags: Using code tags properly

If you mean “optimize,” you absolutely can NOT optimize until you attach the profiler and figure out what the problem is.

If you mean “refactor” or “change” it for touch inputs, check out Youtube, there are hundreds of tutorials on touch input.

I want to make a game so that it works on android

Excellent. Some starting points:

The Unity tutorials linked here: Learning

Tutorials on Youtube, such as Brackeys, which are awesomely done

There are literally hundreds of different examples to draw from, all completely free.