Unless all scripts in your project are error-free, you can’t attach any new script to any new object. The error logs are pretty descriptive, they show which script has errors, at which line, and at which character in that line, with an explanation of the problem itself. You need to learn how to read the console, it will save you a lot of trouble in the future.