Can't add script bacause of class cannot be found

Hello, my project seems to be damaged because when I “put” existing scripts into the game object, the error “Can’t add script bacause of class cannot be found” pops up.
All scripts have a well-set name.
Additionally, when I create a new script, the same thing happens.
I am asking for help because I have been working on the project for a long time.
Unity version: 2019.4.28f1

Things i would check :

  1. Do class names match with the file names for those scripts? (Since you said they have well-set name i am guessing you changed them.
  2. Are those scripts MonoBehavior?

It does it to me too. Did you rename a file previously?

name in script is same as file

Edit:
I think this is the unity bug