how to randomly create gameobject (in canvas) in a radius every second?

i have this game where you can sell the balls when you drag them to the sell cricle

i want the balls to appear every second in a random position (in a radius)

please help me with the script
i tried tutorials but i dont know how to make it work with the canvas
thank you

There are three functions that you need: InvokeRepeating, Random.InsideUnitCircle and Instantiate. You need to learn all three, especially Instantiate because it’s likely something you use very frequently.

using UnityEngine;

public class GameManager : MonoBehaviour
    [SerializeField] GameObject prefab;
    float radius = 3;

    void Start()
        InvokeRepeating("NewBall", 1, 1);

    void NewBall()
        Vector2 position = Random.insideUnitCircle * radius;
        GameObject ball = Instantiate(prefab);
        ball.transform.position = position;