How to change the velocity of a clone?

I am just starting out with Unity, and am trying to spawn a cube that then has a velocity. When the cube is instantiated, no movement occurs. All help is appreciated.

using UnityEngine;

public class Movement : MonoBehaviour
{
    public float speed;

    private void Start()
    {
        GetComponent<Rigidbody>().velocity = new Vector3(speed, 0, 0);
    }
}

I solved the problem, setting the Rigidbody “Is Kinematic” to false.