How do i get scripts to talk to eachother and will this cause the game to end if i have collected 3 coins in my level?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CoinPuckup : MonoBehaviour {
    
    public GameObject coin;
    public static int coinsCollected;
    public GameObject Portal_04;
    private bool SetActive;

    void OnTriggerEnter()
    {
            //Destroy(coin);
            coin.SetActive(false);
            coinsCollected = (coinsCollected + 1);
    }

    void Start()
    {
        if (coinsCollected == 0)
        {
            Portal_04.SetActive(false);
        }

        if (coinsCollected == 3)
        {
            Portal_04.SetActive(true);
        }
    }

    
}

using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class EndGame : MonoBehaviour
{
     public static int coinsCollected;
     void OnTriggerEnter(Collider Player)
     {
       if (Player.gameObject.tag == "Portal_04" & coinsCollected == 3)
       {
                Application.Quit();
        }
     }
}

You can access different scripts like a variable as shown(you misspelled pickup):

CoinPickup CoinPickUpScript;