How do I scale down multiple gameobjects by using a function from a different script?

Hello everyone, im trying to call a function that scales down 15-20 spheres by the press of a buy button(space button) from the script where I keep the points. The space key will eventually be replaced by a button with a click activation on the canvas.

public class BuyStuffScript : MonoBehaviour
{
    public int cost=0;
    public CircleSize circlesize;


    void Update()
    {
        int score = Lava_Points.score;
        if (score >= cost){
            if (Input.GetKeyDown("space"))
            {
                Debug.Log("space");

                circlesize.DecreaseCircle();

                Debug.Log("space2");

                Lava_Points.score -= cost;
            } 
        }
    }
}

But when I call the function from my other script that scales down the object, I think it does not know what object to scale down. This my script that scales down the sphere:

public class CircleSize : MonoBehaviour
{
    public GameObject circle;
    public float decreasingfactor = 0.9f;

    void Start()
    {
        
    }

    void Update()
    {
        if (Input.GetKeyDown("k"))
        {
            Debug.Log("k");
            DecreaseCircle();
        }
    }

    public void DecreaseCircle()
    {
        Debug.Log("Decreased");
        circle.transform.localScale *= decreasingfactor;
    }
}

When I try to scale down the spheres which all have the CircleSize script attached by pressing ‘k’, therefore just using the CircleSize script, it does work, but I think I want to keep score and calling a function that scales down a gameobject seperate. First of all, does my though process make sense in keeping those seperated? If so, how would I approach such a thing?

Thank you!

You can achieve this without using multiple scripts on different objects with the update method. Thats unefficient and could lead to performance issues.
Simply add this Script to your button on your Canvas. You don’t have to set a method in the button inside the inspector, because the script is using Unity’s EventSystem.

Create a script with the same name or one of your choice and add this script to your button and set the size of the array the same as your number of spheres. Add the spheres to the array.

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.UI;
 using UnityEngine.EventSystems;
    
    public class SphereShrink : MonoBehaviour, IPointerUpHandler
    {
    
    public GameObject[] spheres;
    public float decreasingfactor = 0.9f;
    
         public void OnPointerUp(PointerEventData eventData)
         {
               foreach(var sphere in spheres){
               sphere.transform.localScale *= decreasingfactor;
               }    
         }
    }