PyCharm is a lifesaver for developing in Python, but it has a glitch. Sometimes, after you run a script, you lose the ability to type in the editor and make changes. Loads of web sites offer elaborate suggestions to fix the problem, but frequently, these complex solutions don’t work. Frequently they cause other problems. Try the easy solutions first.
The two easy solutions are to double-click on another file in your project, then double click on your script again. And if that doesn’t work, just exit PyCharm entirely and relaunch it.