I want code to only apply to the first gameobject that is clicked with tag "province"

I want it so that the first region that you click with tag “province” will become the capital. Then any following province that you click will not also become the capital.

void Update()
{
    // Check if the user has clicked the mouse button
    if (Input.GetMouseButtonDown(0))
    {
        Vector2 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);

        if (polygonCollider.OverlapPoint(mousePosition))
        {
            if (!StartingProvince)
            {       
                Vector3 newPosition = transform.position;   
                newPosition.y += 0.25f;
                newPosition.z -= 1;
                Capital.transform.position = newPosition;
                StartingProvince = true;     
            }
        }
    }
}

This is the code im using currently, I have another gameobject (“Capital”) which is a building just to indicate that this area is the capital

What I would do is create a bool, called something like “made_Capital” default it to false. When you make your province just set made_Capital to true. Make sure in the province code to check if made_Capital is false.

private bool made_Capital = false;

 void Update()
 {
     // Check if the user has clicked the mouse button
     if (Input.GetMouseButtonDown(0))
     {
         Vector2 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
         if (polygonCollider.OverlapPoint(mousePosition))
         {
             //Added code to check if made province the capital yet
             if (!StartingProvince && !made_Capital)
             {       
                 Vector3 newPosition = transform.position;   
                 newPosition.y += 0.25f;
                 newPosition.z -= 1;
                 Capital.transform.position = newPosition;
                 StartingProvince = true;     

                 //Make sure the script knows the capital has been made
                 made_Capital = true;
             }
         }
     }
 }

Update :
i found out how to do it,
i created an array of all gameobjects then used a static bool to only run the code once

public GameObject[] provinces;
private static bool CapitalProvince = false;

void Update()
{
    // Check if the user has clicked the mouse button
    if (Input.GetMouseButtonDown(0))
    {
        Vector2 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);

        if (polygonCollider.OverlapPoint(mousePosition))
        {
                foreach(GameObject x in provinces)
                {
                    if (!CapitalProvince)
                    {
                    Vector3 newPosition = transform.position;   
                    newPosition.y += 0.25f;
                    newPosition.z -= 1;
                    Capital.transform.position = newPosition;
                    capitalText.text = ("Capital");
                    CapitalProvince = true;
                    }
              }
        }
    }
}