You deleted your script file but have it still attached to a gameobject.
You moved the script to another location in your project outside of Unity. This will break any asset links in general. If you want to move an asset, move it inside Unity.
You renamed an asset or one of the parent folders outside of Unity. Same advice as the last point.
If your script is still there, somewhere in your assets folder / subfolder, just select the object the script was attached to. You should see at the top of your script component on that object a field where it says something like “Missing MonoBehaviour”. Now simply grab your script from your asset folder and drag it to that field in the inspector. This should “relink” the component with the actual script file.