How to reference a real game object in a prefab?

I am trying to make a bullet that has is damage and speed effected by another script on my player character, but I am quite new to referencing other scripts inside of my scripts. Normally I can just make it a public “name of script” and than name it. Of course I have to then select the game object who’s script I wish to reference in the inspector after but for some reason this isn’t an option fir the prefab in my assets folder. Please help!

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

public class BulletScript : MonoBehaviour
    public WeaponInfo weaponInfo;
    public float speed;
    public Rigidbody2D bb;

    void Start()
        speed = weaponInfo.speed;
        bb.velocity = transform.right * speed;
    void OnTriggerEnter2D()

Its some thing like this

  1. Create a private variable of type script to be referenced.
  2. Find the game object using GameObject.Find(Best to do in Start)
  3. Get the script using GetComponent.

if you are using static variables then you can directly reference them.

This video should have what you need How to make enemy be killed by a bullet in Unity 2D game | OnCollisionEnter2D Unity 2D tutorial - YouTube

Add this function to the script on the object that you want to detect getting hit by bullet

OnCollisionEnter2D (Collision2D col) { 
  if (col.gameObject.tag.Equals ("Buller")) { 
    Destroy (col.gameObject); //destroy the bullet. col.gameObject is the reference to the bullet object
    DamageSelf(); //deal damage to object that collided with the bullet.