Why won't the script property show up in my script component? (I'm not sure I used the right words)

So, I have been working at this for over a week now, and I can’t get, for example, userInput to show up in the component drop down for a script on an empty game object. Or how you’re supposed to be able to drag userInput from the Hierarchy, and drop it into the property slot. I feel like this is really simple, and it’s something I’m completely missing,

using UnityEngine;
using UnityEngine.UI;
public class GameLogic : MonoBehaviour
{
    public InputField userInput;
    public Text gameLabel;
    private int randomNum;

    // Start is called before the first frame update
    void Start()
    {
        randomNum = 10;
    }

    // Update is called once per frame
    void Update()
    {
       
    }

    public void OnButtonClick()
    {
        string userInputValue = userInput.text;
        if (userInputValue != "")
        {
            int answer = int.Parse(userInputValue);
            if (answer == randomNum)
            {
                gameLabel.text = "Correct!";
            }
            else if (answer > randomNum)
            {
                gameLabel.text = "Try Lower!";
            }
            else
            {
                gameLabel.text = "Try Higher!";
            }
        }
        else
        {
            gameLabel.text = "Enter a number!";
        }
    }
}

8483051--1128005--Screen Shot 2022-10-01 at 8.23.22 PM.png

To get userInput to show up (it’s a variable), drag the script GameLogic into the empty game object. All the public variables attached to GameLogic will show up in the “component drop down”.