What should I do if it shows this message ? Thank you

Assets/BallControl.js(9,19): BCE0020: An instance of type ‘UnityEngine.Rigidbody’ is required to access non static member ‘AddRelativeTorque’.

You just need to add a RigidBody from the inspector.
Click on the object the script is attacked to → AddComponent → RigidBody.
Another problem could be the missing declaration of the rigidbody in the script. Open the script and paste this.

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class MyCass : MonoBehaviour {
   
    private RigidBody _rb;

    void Awake()
    {
        _rb = GetComponent<RigidBody>();
    }

On line 9 of your BallControl script, you make sure that AddRelativeTorque is being called on an instance of a Rigidbody component.

you are telling Unity to apply torque in Air … Unity is a bit angry just make him happy like this

public Rigidbody rigidbodyReference;
rigidbodyReference.AddRelativeTorque(Vector3.up * 10);

AddRelativeTorque is a member of Rigidbody class